/* -----------------------------------
   ANIMATIONS & LANDING INTRO STYLES (SOPHISTICATED & VANGUARD)
----------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@800;900&family=Pacifico&display=swap');

/* --- CONTENEDOR DE LA INTRO --- */
#intro-overlay {
    position: fixed;
    inset: 0;
    background: #050505; /* Negro Profundo Oficial */
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 1.8s cubic-bezier(0.85, 0, 0.15, 1), opacity 1.8s ease;
}

#intro-overlay.contracted {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

/* --- LOGO EN CONSTRUCCIÓN (VECTORES) --- */
.vector-container {
    width: 80vw;
    max-width: 250px;
    height: 80vw;
    max-height: 250px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vector-line {
    fill: none;
    stroke: #ccff00; /* Verde Limón Oficial */
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 450;
    stroke-dashoffset: 450;
    animation: drawVector 5.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes drawVector {
    to {
        stroke-dashoffset: 0;
    }
}

.vector-fill {
    fill: url(#limeGrad); /* Degradado Verde Limón */
    opacity: 0;
    animation: fillShape 1.8s 5.0s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes fillShape {
    to {
        opacity: 0.9;
        filter: drop-shadow(0 0 35px rgba(204, 255, 0, 0.35));
    }
}

/* --- LLUVIA DE PARTICULAS (Lenta y sutil en verde limón) --- */
.particle {
    position: absolute;
    width: 3px;
    height: 10px;
    background: linear-gradient(to bottom, #ccff00, transparent);
    pointer-events: none;
    opacity: 0.6;
}

/* --- FLASH DE IMPLOSIÓN --- */
.implosion-flash {
    position: absolute;
    inset: 0;
    background: #ffffff;
    opacity: 0;
    z-index: 10001;
    pointer-events: none;
}

.implosion-flash.active {
    animation: flashAnim 1.2s cubic-bezier(0.1, 0.8, 0.1, 1) forwards;
}

@keyframes flashAnim {
    0% { opacity: 0; }
    25% { opacity: 1; }
    100% { opacity: 0; }
}

/* --- FRASE DUAL: BRAND & IDENTITY (AUTOAJUSTABLE Y RELACIÓN 3:1) --- */
.text-reveal-container {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 4vw;
    position: absolute;
    z-index: 10002;
    width: 90%;
    max-width: 800px;
    flex-wrap: wrap; /* Autoajustable en móviles */
    text-align: center;
}

.word-brand {
    font-family: 'Monoton', sans-serif;
    font-size: 15vw; /* Escala responsiva en móvil */
    font-weight: normal;
    color: #ccff00; /* Verde Limón Oficial */
    letter-spacing: -2px;
    text-transform: uppercase;
    transform: rotate(180deg) scaleX(-1);
    opacity: 0;
    filter: blur(15px);
    animation: revealLeft 2.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative; /* Anchor for absolute overlay */
    display: inline-block;
}

.word-identity {
    font-family: 'Advent Pro', sans-serif;
    font-size: 5.2vw; /* Relación 3:1 exacta */
    font-weight: 136;
    font-variation-settings: "wdth" 131, "wght" 136, "slnt" 1;
    color: #ffffff;
    opacity: 0;
    filter: blur(15px);
    position: absolute;
    left: 81%;
    top: 5%;
    animation: revealRight 2.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    text-shadow: 
        -2px -2px 0 #050505,  
         2px -2px 0 #050505,
        -2px  2px 0 #050505,
         2px  2px 0 #050505,
         0 4px 20px rgba(0,0,0,0.95);
}

/* Desktop override para mantener el tamaño ideal en pantallas grandes */
@media (min-width: 768px) {
    .word-brand {
        font-size: 7.5rem;
    }
    .word-identity {
        font-size: 2.5rem;
        left: 81%;
        top: 8%;
    }
    .text-reveal-container {
        flex-wrap: nowrap;
    }
}

@keyframes revealLeft {
    to {
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes revealRight {
    to {
        opacity: 1;
        filter: blur(0);
        transform: scale(1) translateY(0);
    }
}

/* --- LANDING CONTENT --- */
.landing-hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 16px;
    overflow: hidden;
    width: 100%;
}

/* --- FONDO BLUR OFICIAL --- */
.tsolutions-bg-blur {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 600px;
    height: 90vw;
    max-height: 600px;
    opacity: 0.12;
    filter: blur(80px);
    pointer-events: none;
    z-index: -1;
    transition: opacity 1.5s;
}

/* --- TARJETAS MAGNÉTICAS 3D RESPONSIBLES --- */
.magnetic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1100px;
    margin-top: 40px;
    perspective: 1000px;
}

.magnetic-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(115, 130, 118, 0.25); /* Gris Humo Oficial */
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    transition: transform 0.1s ease, box-shadow 0.4s, border-color 0.4s, background 0.4s;
    transform-style: preserve-3d;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.magnetic-card:hover {
    background: rgba(204, 255, 0, 0.02);
    border-color: #ccff00; /* Verde Limón */
    box-shadow: 0 12px 30px rgba(204, 255, 0, 0.08);
}

.card-depth-content {
    transform: translateZ(30px);
    transition: transform 0.3s;
}

/* --- ESTILOS DE BRIEFING INCANDESCENTES Y PARTÍCULAS --- */
.glowing-input {
    background: rgba(255, 255, 255, 0.01) !important;
    border: 1px solid rgba(204, 255, 0, 0.25) !important;
    color: var(--theme-text) !important;
    transition: border-color 0.4s, box-shadow 0.4s, background 0.4s;
    animation: pulsingGlowBorder 4s infinite alternate ease-in-out;
}

.glowing-input:focus {
    background: rgba(204, 255, 0, 0.04) !important;
    border-color: #ccff00 !important;
    box-shadow: 0 0 16px rgba(204, 255, 0, 0.4) !important;
    animation: none; /* Detener animación de pulso al enfocar */
}

@keyframes pulsingGlowBorder {
    0% {
        border-color: rgba(204, 255, 0, 0.2);
        box-shadow: 0 0 5px rgba(204, 255, 0, 0.05);
    }
    100% {
        border-color: rgba(204, 255, 0, 0.55);
        box-shadow: 0 0 15px rgba(204, 255, 0, 0.25);
    }
}

#briefing-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
}

.floating-dot {
    position: absolute;
    background: #ccff00;
    border-radius: 50%;
    filter: blur(2.5px);
    opacity: 0;
    animation: floatParticle 8s linear infinite;
}

@keyframes floatParticle {
    0% {
        transform: translateY(105vh) scale(0.6);
        opacity: 0;
    }
    15% {
        opacity: 0.45;
    }
    85% {
        opacity: 0.45;
    }
    100% {
        transform: translateY(-10vh) scale(1.3);
        opacity: 0;
    }
}

/* --- ANIMACIONES EN CASCADA --- */
.cascade-item {
    opacity: 0;
    transform: translateY(16px);
    animation: cascadeIn 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cascadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- CURSOR PERSONALIZADO DE CRISTAL --- */
html, body, a, button, select, input, textarea, [role="button"], .sidebar-item, .magnetic-card {
    cursor: none !important;
}

#custom-glass-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    pointer-events: none;
    z-index: 999999;
    transform: translate3d(0, 0, 0);
    filter: drop-shadow(0 0 8px rgba(204, 255, 0, 0.7)); /* Incandescencia Verde Limón */
    transition: transform 0.04s ease-out;
    display: none; /* Se activa por JS */
}

.cursor-click-particle {
    position: fixed;
    border-radius: 50%;
    background: #ccff00; /* Verde Limón */
    pointer-events: none;
    z-index: 999998;
    box-shadow: 0 0 10px rgba(204, 255, 0, 0.8);
    transform: translate(-50%, -50%);
    opacity: 1;
    animation: clickParticleAnim 0.45s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes clickParticleAnim {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(0.1);
        opacity: 0;
    }
}

/* --- REACTIVE FLOATING LABELS (ESTILO CÁPSULA INTERNA) --- */
.floating-group {
    position: relative;
    width: 100%;
}

.floating-group input {
    width: 100%;
    box-sizing: border-box;
    padding: 24px 18px 8px !important; /* Espacio superior para que el texto quede abajo */
    border-radius: 20px; /* Forma de cápsula redondeada de la referencia */
    background: rgba(5, 5, 5, 0.6) !important;
    border: 1px solid var(--theme-border);
    outline: none;
    font-size: 0.95rem;
    color: var(--theme-text) !important; /* Texto nativo visible y funcional */
    caret-color: var(--theme-primary) !important; /* Cursor parpadeante verde limón visible */
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Enfoque: Borde verde limón y resplandor incandescente suave de la referencia */
.floating-group input:focus {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 14px rgba(204, 255, 0, 0.25) !important;
}



.floating-group label {
    position: absolute;
    left: 18px;
    top: 16px; /* Posición vertical inicial centrada dentro de la cápsula */
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--theme-muted) !important;
    pointer-events: none;
    transition: all 0.22s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: transparent !important; /* Sin fondo opaco ya que se mantiene dentro */
    padding: 0;
    z-index: 2;
}

/* Estado Activo: Foco o Contenido Escrito (Flota hacia arriba dentro de la cápsula) */
.floating-group input:focus ~ label,
.floating-group input:not(:placeholder-shown) ~ label {
    top: 6px; /* Flota al extremo superior izquierdo interno */
    left: 18px;
    font-size: 0.72rem;
    color: var(--theme-primary) !important; /* Verde Limón */
    font-weight: 700;
    background: transparent !important;
}

body.light-mode .floating-group input {
    background: rgba(255, 255, 255, 0.15) !important;
}

/* --- PROTAGONISMO DEL ECLIPSE EN LA INTRO --- */
.vector-eclipse-line {
    fill: none;
    stroke: #ffffff; /* Blanco elegante */
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 450;
    stroke-dashoffset: 450;
    animation: drawVector 3.0s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.vector-eclipse-fill {
    fill: #738276; /* Gris Humo */
    opacity: 0;
    animation: fillShapeEclipse 1.5s 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes fillShapeEclipse {
    to {
        opacity: 1;
        filter: drop-shadow(0 0 25px rgba(115, 130, 118, 0.6));
    }
}

.vector-other-line {
    fill: none;
    stroke: #ccff00; /* Verde Limón */
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 450;
    stroke-dashoffset: 450;
    animation: drawVector 4.0s 2.0s cubic-bezier(0.25, 1, 0.5, 1) forwards; /* Espera 2 segundos */
}

/* --- RAYOS Y CHISPAS AL ESCRIBIR EN INPUTS --- */
.key-spark {
    position: absolute;
    width: 2px;
    height: 16px;
    background: #ccff00;
    pointer-events: none;
    transform: translateY(-50%) scale(1);
    opacity: 1;
    z-index: 10;
    box-shadow: 0 0 8px #ccff00, 0 0 16px #ccff00;
    animation: keySparkAnim 0.35s ease-out forwards;
}

@keyframes keySparkAnim {
    0% {
        transform: translateY(-50%) scaleY(0.1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: translateY(-50%) scaleY(1.4) rotate(90deg);
        opacity: 0.9;
    }
    100% {
        transform: translateY(-50%) scaleY(0.1) rotate(180deg);
        opacity: 0;
    }
}

/* --- HOVER/FOCUS TOOLTIP BUBBLES --- */
.tooltip-bubble {
    position: relative;
    margin-top: 10px;
    background: rgba(204, 255, 0, 0.04);
    border: 1px solid rgba(204, 255, 0, 0.2);
    box-shadow: inset 0 0 8px rgba(204, 255, 0, 0.02);
    color: #cbd5e1;
    padding: 12px 16px;
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.82rem;
    line-height: 1.45;
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

/* Revelar tooltip al hacer Focus en el input */
.floating-group input:focus ~ .tooltip-bubble {
    display: block;
    opacity: 1;
}

/* Ocultar anuncios laterales en viewports angostos */
@media (max-width: 1200px) {
    .ad-slot {
        display: none !important;
    }
}

/* Responsividad para los controles centrales en la navbar */
@media (max-width: 850px) {
    .navbar-center-controls {
        display: none !important; /* Ocultar en móviles muy estrechos para evitar solapamiento */
    }
}

/* Animación Neon Pulse para Ad Placeholders */
@keyframes neonAdPulse {
    0% { border-color: rgba(204, 255, 0, 0.2); box-shadow: 0 0 5px rgba(204, 255, 0, 0.05); }
    50% { border-color: rgba(204, 255, 0, 0.6); box-shadow: 0 0 15px rgba(204, 255, 0, 0.2); }
    100% { border-color: rgba(204, 255, 0, 0.2); box-shadow: 0 0 5px rgba(204, 255, 0, 0.05); }
}

.animated-ad-placeholder {
    border: 1px dashed rgba(204, 255, 0, 0.3);
    animation: neonAdPulse 3s infinite ease-in-out;
    background: rgba(204, 255, 0, 0.01);
    color: #ccff00;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 12px;
    padding: 24px;
    height: 320px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.animated-ad-placeholder:hover {
    background: rgba(204, 255, 0, 0.05);
    border-style: solid;
}
