/* ==========================================================================
   AI&Solutions - Modern & Innovative AI Tech Stylesheet
   Balanced Dark & Light Harmonious Architecture (Sobriedad & Vanguardia)
   ========================================================================== */

:root {
    --bg-dark: #070A13;
    --bg-dark-secondary: #0A0F1D;
    --bg-card: #0E1626;
    --bg-card-hover: #131E33;
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --border-light: #E2E8F0;
    --text-dark: #0F172A;
    --text-muted: #64748B;
    --accent-cyan: #06B6D4;
    --accent-blue: #0284C7;
    --accent-indigo: #4F46E5;
    --accent-violet: #7C3AED;
    --accent-emerald: #10B981;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: #475569;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0F172A;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4F46E5, #0284C7);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0284C7;
}

/* Background Cyber Grid for Dark Sections */
.cyber-grid {
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(79, 70, 229, 0.15) 0%, transparent 60%),
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 48px 48px, 48px 48px;
}

/* Dynamic AI Canvas for Hero */
#hero-neural-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

@keyframes pulse-slow {
    0%, 100% {
        opacity: 0.55;
        transform: translate(-50%, 0) scale(1);
    }
    50% {
        opacity: 0.9;
        transform: translate(-50%, -12px) scale(1.06);
    }
}

.animate-pulse-slow {
    animation: pulse-slow 9s ease-in-out infinite;
}

/* Subtle Grid for Light Sections */
.light-grid {
    background-image: 
        linear-gradient(to right, rgba(226, 232, 240, 0.6) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(226, 232, 240, 0.6) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* Gradient text - versatile for dark & light */
.gradient-text {
    background: linear-gradient(135deg, #0284C7 0%, #4F46E5 50%, #7C3AED 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-light {
    background: linear-gradient(135deg, #38BDF8 0%, #818CF8 50%, #C084FC 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Gradient line */
.gradient-line {
    height: 3px;
    background: linear-gradient(90deg, #0284C7, #4F46E5, #7C3AED);
    border-radius: 2px;
}

/* Glassmorphism for Dark Sections */
.glass-panel {
    background: rgba(14, 22, 38, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Light Card Style - Sobrio, limpio y moderno */
.light-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.light-card:hover {
    transform: translateY(-4px);
    border-color: #38BDF8;
    box-shadow: 0 14px 28px -6px rgba(14, 165, 233, 0.12), 0 6px 12px -4px rgba(15, 23, 42, 0.04);
}

/* Glowing cards for Dark Sections */
.card-glow {
    position: relative;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-glow::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.4), rgba(79, 70, 229, 0.4), transparent 70%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.card-glow:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px -10px rgba(79, 70, 229, 0.25), 0 0 20px 2px rgba(2, 132, 199, 0.15);
}

.card-glow:hover::before {
    opacity: 1;
}

/* CTA buttons */
.btn-cta {
    background: linear-gradient(135deg, #0284C7 0%, #4F46E5 50%, #7C3AED 100%);
    background-size: 200% 200%;
    color: #ffffff !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-cta:hover {
    background-position: right center;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.45), 0 0 12px rgba(2, 132, 199, 0.3);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.btn-outline:hover {
    border-color: #38BDF8;
    background: rgba(56, 189, 248, 0.1);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.btn-outline-dark {
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    color: #0F172A;
    transition: all 0.3s ease;
}

.btn-outline-dark:hover {
    border-color: #4F46E5;
    background: #F8FAFC;
    color: #4F46E5;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.1);
}

/* Glowing status badge */
.badge-live {
    position: relative;
}

.badge-live::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10B981;
    margin-right: 6px;
    box-shadow: 0 0 8px #10B981;
    animation: live-pulse 2s infinite ease-in-out;
}

@keyframes live-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.85);
    }
}

/* AI Terminal Box styling */
.terminal-window {
    background: #0B1120;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 35px rgba(79, 70, 229, 0.2);
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Mobile menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active {
    transform: translateX(0);
}

/* Scroll animations */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Image zoom effect */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.img-zoom:hover img {
    transform: scale(1.06);
}

/* Active navigation item */
.nav-active {
    color: #38BDF8 !important;
}

.nav-active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #0284C7, #4F46E5);
    border-radius: 2px;
    box-shadow: 0 0 10px #0284C7;
}

/* Hamburger lines */
.hamburger-line {
    transition: all 0.3s ease;
}

.menu-open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.menu-open .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}