/* =========================================
   KRONOSS DESIGN - ESTILOS PRINCIPALES
   Optimizado para rendimiento y elegancia
   ========================================= */

/* === RESET Y BASE === */
html {
    background-color: #050505;
    overscroll-behavior-y: none;
    width: 100%;
    overflow-x: clip;
    -webkit-tap-highlight-color: transparent;
}

body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    margin: 0;
    padding: 0;
    background-color: #050505;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    -webkit-overflow-scrolling: touch;
    touch-action: manipulation;
    position: relative;
}

/* === ACELERACIÓN GPU === */
* {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* === OPTIMIZACIÓN DE CONTENIDO === */
#servicios,
#portafolio,
#marcas-carousel,
#contacto {
    content-visibility: auto;
    contain-intrinsic-size: 800px;
}

#hero-section {
    background-color: #050505;
}

/* === FONDOS Y GRADIENTES === */
.hybrid-seamless-bg {
    background: linear-gradient(to bottom, #050505 0%, #050505 60%, #080c14 80%, #1e293b 95%, #ffffff 100%);
    position: relative;
    z-index: 1;
    overflow: visible;
}

/* === EFECTOS GLASS === */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transform: translateZ(0);
    will-change: transform;
}

.glass-card:hover {
    border-color: rgba(0, 157, 255, 0.5);
    box-shadow: 0 0 30px rgba(0, 157, 255, 0.25);
}

.glass-card-active {
    border-color: rgba(0, 157, 255, 0.6) !important;
    box-shadow: 0 0 30px rgba(0, 157, 255, 0.25) !important;
    transform: scale(1.02);
}

/* === EFECTOS NEON === */
.neon-glow-text {
    color: #009DFF;
    text-shadow: 0 0 10px rgba(0, 157, 255, 0.5), 0 0 20px rgba(0, 157, 255, 0.3);
    animation: neon-blink 3s infinite ease-in-out;
}

@keyframes neon-blink {

    0%,
    100% {
        opacity: 1;
        text-shadow: 0 0 15px rgba(0, 157, 255, 0.7), 0 0 30px rgba(0, 157, 255, 0.4);
    }

    50% {
        opacity: 0.8;
        text-shadow: 0 0 5px rgba(0, 157, 255, 0.3), 0 0 10px rgba(0, 157, 255, 0.1);
    }
}

/* === MODALES === */
.service-modal-glass,
.contact-modal-glass {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 2px solid rgba(0, 157, 255, 0.7);
    box-shadow: 0 0 40px rgba(0, 157, 255, 0.25);
    transform: translateZ(0);
}

.contact-modal-glass {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 25px 50px -12px rgba(0, 157, 255, 0.25);
}

/* === PORTAFOLIO === */
.portfolio-glass-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 157, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 157, 255, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform: translateZ(0);
}

/* === CONTACTO === */
.contact-glass-box {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 157, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    transform: translateZ(0);
}

.glass-input {
    background: rgba(240, 245, 255, 0.5);
    border: 1px solid rgba(0, 157, 255, 0.1);
    color: #334155;
    transition: all 0.3s ease;
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.9);
    border-color: #009DFF;
    box-shadow: 0 0 0 4px rgba(0, 157, 255, 0.1);
    outline: none;
}

/* === BOTÓN ESTRELLADO === */
.star-btn {
    position: relative;
    overflow: hidden;
    background-color: black;
    z-index: 1;
    transform: translateZ(0);
}

.star-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.5px 1.5px at 20% 30%, white 100%, transparent),
        radial-gradient(2px 2px at 50% 80%, #009DFF 100%, transparent);
    background-size: 100% 100%;
    animation: twinkle 2s infinite alternate ease-in-out;
    opacity: 0.9;
    z-index: -1;
    will-change: opacity, transform;
}

@keyframes twinkle {
    0% {
        opacity: 0.5;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* === CARRUSEL === */
.animate-scroll {
    animation: scroll 30s linear infinite;
    will-change: transform;
    transform: translateZ(0);
}

.carousel-container:hover .animate-scroll {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* === EFECTOS DE PERFIL === */
.profile-glow::before {
    content: '';
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle, rgba(0, 157, 255, 0.5) 0%, rgba(0, 157, 255, 0.2) 45%, rgba(0, 157, 255, 0) 75%);
    z-index: -1;
    animation: breathingGlow 5s infinite ease-in-out;
    filter: blur(15px);
    will-change: opacity, transform;
}

@keyframes breathingGlow {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(0.85);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* === EFECTO RESPIRANTE DEL LOGO HERO (Más sutil) === */
#main-hero-logo {
    animation: heroBreathing 4s infinite ease-in-out;
}

@keyframes heroBreathing {

    0%,
    100% {
        filter: drop-shadow(0 0 20px rgba(0, 157, 255, 0.3));
        transform: scale(1);
    }

    50% {
        filter: drop-shadow(0 0 30px rgba(0, 157, 255, 0.5));
        transform: scale(1.02);
    }
}

/* === SCROLLBAR PERSONALIZADO === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #050505;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #009DFF;
}

/* === CANVAS DE CONSTELACIONES === */
.constellation-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}