/* ==========================================================================
   INTERNET & MANTECA - PÁGINA EN CONSTRUCCIÓN 3D
   Cintas adaptativas (Web/Mobile), Pug agrandado en Web, Iconos 3D con Brillo
   ========================================================================== */

:root {
    --amarillo: #F5C800;
    --amarillo-dark: #D4AD00;
    --amarillo-glow: rgba(245, 200, 0, 0.4);
    --cian: #32D9D9;
    --magenta: #FF2A85;
    --whatsapp-green: #25D366;

    --bg-negro: #0A0A0C;
    --bg-darker: #060608;
    --card-dark: #121216;
    --border-dark: #26262F;
    --text-pure-white: #FFFFFF;
    --text-muted: #9CA3AF;
    --text-sub: #D1D5DB;

    --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Reset y Bases */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
    background-color: var(--bg-negro);
    color: var(--text-pure-white);
    font-family: var(--font-body);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

/* Oculto visualmente pero 100% legible para motores de búsqueda, IAs y lectores de pantalla */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Fondo de Grilla Brutalista */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        radial-gradient(rgba(245, 200, 0, 0.12) 1.5px, transparent 1.5px),
        radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 36px 36px, 18px 18px;
    background-position: 0 0, 9px 9px;
    pointer-events: none;
    z-index: 1;
}

.grid-background::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85vw;
    height: 85vh;
    background: radial-gradient(circle, rgba(245, 200, 0, 0.09) 0%, rgba(10, 10, 12, 0) 70%);
    pointer-events: none;
}

/* Ticker superior animado tipo banner */
.tape-ticker {
    width: 100%;
    height: 36px;
    background-color: var(--amarillo);
    color: #000;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    z-index: 80;
    border-bottom: 3px solid #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
}

.tape-track {
    display: flex;
    width: fit-content;
    animation: ticker-loop 24s linear infinite;
}

.tape-text {
    padding-right: 2rem;
    flex-shrink: 0;
}

@keyframes ticker-loop {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Envoltura general - Altura exacta de pantalla */
.site-wrapper {
    position: relative;
    z-index: 10;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

/* ==========================================================================
   ESCENARIO 3D CENTRAL - PANTALLA COMPLETA
   ========================================================================== */
.construction-stage {
    position: relative;
    flex: 1;
    width: 100vw;
    height: calc(100vh - 86px);
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
    overflow: hidden;
}

/* Capa 1: Logo 3D Transparente (Solo manteca, envoltorio y estructura 3D) */
.logo-stage-layer {
    position: absolute;
    top: 46%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(720px, 82vw);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    transform-style: preserve-3d;
    pointer-events: none;
    will-change: transform;
}

.logo-clean-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-3d-clean {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 45px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 40px rgba(245, 200, 0, 0.22));
}

/* Capa 2: CINTAS EN FRENTE (WEB: PRIMERA CINTA, MOBILE: SEGUNDA CINTA) */
.cintas-stage-layer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    min-width: 100vw;
    min-height: 100vh;
    pointer-events: none;
    z-index: 25;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    will-change: transform;
}

.cintas-picture {
    width: 100vw;
    height: 100vh;
    display: block;
    pointer-events: none;
}

.cintas-img {
    width: 100vw;
    height: 100vh;
    min-width: 100vw;
    min-height: 100vh;
    object-fit: cover;
    display: block;
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.98));
}

/* Capa 3: ICONOS FLOTANTES DE WHATSAPP E INSTAGRAM (3D CON BRILLO) */
.floating-center-hub.lower-hub {
    position: absolute;
    bottom: 18%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.floating-icons-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3.5rem;
    position: relative;
}

/* Burbujas de iconos flotantes con efecto 3D y relieve */
.app-icon-bubble {
    position: relative;
    width: 86px;
    height: 86px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    outline: none;
    overflow: visible;
    perspective: 600px;
}

.icon-3d-frame {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3.5px solid #000000;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.app-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 18px;
}

/* Reflejo curvado superior 3D (Efecto lente de cristal) */
.icon-3d-frame::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 4px;
    right: 4px;
    height: 46%;
    border-radius: 18px 18px 10px 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
    z-index: 5;
}

/* Destello estrella 3D titilante en la esquina */
.bubble-sparkle {
    position: absolute;
    top: -8px;
    right: -8px;
    color: #FFFFFF;
    font-size: 20px;
    line-height: 1;
    pointer-events: none;
    z-index: 8;
    text-shadow: 0 0 6px #FFFFFF, 0 0 14px rgba(255, 255, 255, 0.95);
    animation: sparkleTwinkle 2.5s ease-in-out infinite alternate;
}

@keyframes sparkleTwinkle {
    0%, 20% { transform: scale(0.6) rotate(0deg); opacity: 0.3; }
    50% { transform: scale(1.35) rotate(45deg); opacity: 1; filter: drop-shadow(0 0 8px #fff); }
    80%, 100% { transform: scale(0.7) rotate(90deg); opacity: 0.4; }
}

/* Relieve y bisel 3D WhatsApp */
.bubble-whatsapp .icon-3d-frame {
    box-shadow: 
        0 8px 0 #000000,
        0 16px 30px rgba(0, 0, 0, 0.85),
        inset 0 3px 5px rgba(255, 255, 255, 0.75),
        inset 0 -4px 8px rgba(0, 0, 0, 0.45),
        0 0 30px rgba(37, 211, 102, 0.55);
}

.bubble-whatsapp {
    animation: floatWa 3.4s ease-in-out infinite alternate;
}

.bubble-whatsapp:hover .icon-3d-frame {
    transform: perspective(600px) rotateX(10deg) scale(1.14) translate(-2px, -6px);
    box-shadow: 
        0 14px 0 #000000,
        0 24px 40px rgba(0, 0, 0, 0.95),
        inset 0 4px 6px rgba(255, 255, 255, 0.95),
        0 0 45px rgba(37, 211, 102, 0.85);
}

.bubble-whatsapp:active .icon-3d-frame {
    transform: scale(0.96) translate(2px, 4px);
    box-shadow: 0 2px 0 #000000, 0 4px 10px rgba(0,0,0,0.8);
}

/* Relieve y bisel 3D Instagram */
.bubble-instagram .icon-3d-frame {
    box-shadow: 
        0 8px 0 #000000,
        0 16px 30px rgba(0, 0, 0, 0.85),
        inset 0 3px 5px rgba(255, 255, 255, 0.75),
        inset 0 -4px 8px rgba(0, 0, 0, 0.45),
        0 0 30px rgba(220, 39, 67, 0.55);
}

.bubble-instagram {
    animation: floatIg 4.0s ease-in-out infinite alternate-reverse;
}

.bubble-instagram:hover .icon-3d-frame {
    transform: perspective(600px) rotateX(10deg) scale(1.14) translate(-2px, -6px);
    box-shadow: 
        0 14px 0 #000000,
        0 24px 40px rgba(0, 0, 0, 0.95),
        inset 0 4px 6px rgba(255, 255, 255, 0.95),
        0 0 45px rgba(220, 39, 67, 0.85);
}

.bubble-instagram:active .icon-3d-frame {
    transform: scale(0.96) translate(2px, 4px);
    box-shadow: 0 2px 0 #000000, 0 4px 10px rgba(0,0,0,0.8);
}

@keyframes floatWa {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-11px) rotate(-3deg); }
    100% { transform: translateY(9px) rotate(2deg); }
}

@keyframes floatIg {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(11px) rotate(3deg); }
    100% { transform: translateY(-9px) rotate(-2deg); }
}

.bubble-tooltip {
    position: absolute;
    bottom: -34px;
    left: 50%;
    transform: translateX(-50%);
    background: #141418;
    border: 1px solid var(--border-dark);
    color: #FFF;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.85);
}

.app-icon-bubble:hover .bubble-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(4px);
}

/* ==========================================================================
   PUG CON MARTILLO (MÁS GRANDE EN VERSIÓN WEB: 520px)
   ========================================================================== */
.pug-supervisor-container {
    position: fixed;
    bottom: -60px; /* Conectado con el pie de página para que nunca flote en el aire */
    right: 3.5rem;
    width: 520px; /* Tamaño bien grande y notorio en WEB */
    z-index: 60; /* Detrás del footer (70) */
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.pug-visual-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    cursor: pointer;
    /* Difuminado suave progresivo en la base: disuelve por completo el corte recto y la línea de brillo horizontal */
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 65%, rgba(0, 0, 0, 0.7) 74%, rgba(0, 0, 0, 0.15) 82%, transparent 86%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 65%, rgba(0, 0, 0, 0.7) 74%, rgba(0, 0, 0, 0.15) 82%, transparent 86%);
}

.pug-gif-img {
    width: 100%;
    height: auto;
    max-height: 700px;
    display: block;
    object-fit: contain;
    /* Contorno neón (borde blanco fino + halo amarillo manteca) para suavizar y disimular el recorte */
    filter: 
        drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.85))
        drop-shadow(0 0 8px rgba(245, 200, 0, 0.7))
        drop-shadow(0 0 22px rgba(245, 200, 0, 0.35))
        drop-shadow(0 15px 35px rgba(0, 0, 0, 0.95));
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
}

.pug-visual-wrapper:hover .pug-gif-img {
    transform: scale(1.03);
    filter: 
        drop-shadow(0 0 2.5px rgba(255, 255, 255, 0.95))
        drop-shadow(0 0 14px rgba(245, 200, 0, 0.85))
        drop-shadow(0 0 30px rgba(245, 200, 0, 0.5))
        drop-shadow(0 20px 40px rgba(0, 0, 0, 0.95));
}

/* Bocadillo de diálogo del Pug (Inclinado y flotando) */
.pug-speech-bubble {
    position: absolute;
    bottom: 92%;
    right: 35px;
    width: 270px;
    background-color: #141418;
    border: 2px solid var(--amarillo);
    border-radius: 8px;
    padding: 0.9rem 1.2rem;
    box-shadow: 5px 5px 0px #000000;
    cursor: pointer;
    z-index: 85;
    transform-origin: bottom right;
    animation: bubbleFloating 3.8s ease-in-out infinite alternate;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

@keyframes bubbleFloating {
    0% {
        transform: translateY(0px) rotate(-3.5deg);
    }
    50% {
        transform: translateY(-9px) rotate(-1.5deg);
    }
    100% {
        transform: translateY(2px) rotate(-4.2deg);
    }
}

.pug-speech-bubble:hover {
    border-color: var(--amarillo);
    box-shadow: 7px 7px 0px #000000, 0 0 20px rgba(245, 200, 0, 0.4);
}

.bubble-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.4rem;
}

.pug-rank {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.76rem;
    color: var(--amarillo);
    letter-spacing: 0.06em;
}

.bubble-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-pure-white);
    line-height: 1.35;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.bubble-arrow {
    position: absolute;
    bottom: -8px;
    right: 50px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--amarillo);
}

/* ==========================================================================
   FOOTER OPACO - TAPA LAS PATAS DEL PUG POR ENCIMA
   ========================================================================== */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2.5rem;
    border-top: 2px solid var(--border-dark);
    font-size: 0.82rem;
    color: var(--text-muted);
    background: #0A0A0C; /* Fondo sólido opaco que cubre las patas */
    z-index: 70; /* Por encima del pug (60) */
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.9);
}

.site-footer strong {
    color: var(--amarillo);
}

/* ==========================================================================
   RESPONSIVE: CELULARES Y TABLETS (SOLO EN WEB SE AGRANDA EL PUG)
   ========================================================================== */
@media (max-width: 1200px) {
    .pug-supervisor-container {
        width: 420px;
        right: 2rem;
        bottom: -48px;
    }
}

@media (max-width: 900px) {
    .pug-supervisor-container {
        width: 290px;
        right: 1rem;
        bottom: -32px;
    }

    .pug-speech-bubble {
        width: 230px;
        right: 0;
    }

    .floating-center-hub.lower-hub {
        bottom: 19%;
    }
}

@media (max-width: 768px) {
    .logo-stage-layer {
        width: 88vw;
        top: 42%;
    }

    .floating-center-hub.lower-hub {
        bottom: clamp(135px, 25dvh, 220px);
    }

    .floating-icons-wrapper {
        gap: 2.2rem;
    }

    .app-icon-bubble {
        width: 72px;
        height: 72px;
        border-radius: 20px;
    }

    .icon-3d-frame {
        border-radius: 18px;
    }

    /* En celulares el pug mantiene su tamaño proporcionado */
    .pug-supervisor-container {
        width: 200px;
        right: 0.5rem;
        bottom: -22px;
    }

    /* Globo de diálogo activo y compacto en móviles */
    .pug-speech-bubble {
        display: block;
        width: 195px;
        right: 8px;
        bottom: 94%;
        padding: 0.55rem 0.75rem;
        box-shadow: 3px 3px 0px #000000;
    }

    .bubble-header {
        margin-bottom: 0.2rem;
    }

    .pug-rank {
        font-size: 0.65rem;
    }

    .bubble-text {
        font-size: 0.72rem;
        line-height: 1.25;
    }

    .bubble-arrow {
        right: 32px;
        bottom: -6px;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 6px solid var(--amarillo);
    }

    .site-footer {
        height: 44px;
        padding: 0 1rem;
        font-size: 0.72rem;
    }
}

@media (max-width: 480px) {
    .logo-stage-layer {
        width: 92vw;
        top: 38%;
    }

    .floating-center-hub.lower-hub {
        bottom: clamp(120px, 26dvh, 200px);
    }

    .app-icon-bubble {
        width: 66px;
        height: 66px;
        border-radius: 18px;
    }

    .icon-3d-frame {
        border-radius: 16px;
    }

    .pug-supervisor-container {
        width: 160px;
        right: 0.2rem;
        bottom: -18px;
    }

    /* Globo de diálogo optimizado para pantallas angostas */
    .pug-speech-bubble {
        display: block;
        width: 170px;
        right: 4px;
        bottom: 95%;
        padding: 0.45rem 0.65rem;
        border-width: 1.5px;
        box-shadow: 3px 3px 0px #000000;
    }

    .bubble-header {
        margin-bottom: 0.15rem;
    }

    .pug-rank {
        font-size: 0.60rem;
    }

    .bubble-text {
        font-size: 0.68rem;
        line-height: 1.2;
    }

    .bubble-arrow {
        right: 26px;
        bottom: -5px;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 5px solid var(--amarillo);
    }

    .site-footer {
        flex-direction: column;
        justify-content: center;
        height: 48px;
        gap: 0.2rem;
        text-align: center;
    }
}
