/* SkyV2X Landing Page - Custom Styles */

/* Variables CSS */
:root {
    --sky-blue: #0EA5E9;
    --sky-dark: #0C4A6E;
    --sky-light: #E0F2FE;
    --gradient-primary: linear-gradient(135deg, var(--sky-dark) 0%, #1e3a8a 50%, #4338ca 100%);
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-glow: 0 0 30px rgba(14, 165, 233, 0.3);
}

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

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

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: var(--sky-blue);
    border-radius: 5px;
}

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

/* Gradient text animation */
.gradient-text {
    background: linear-gradient(135deg, #0EA5E9, #60A5FA, #93C5FD);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Hero section enhanced */
.hero-gradient {
    background: linear-gradient(135deg, var(--sky-dark) 0%, #1e3a8a 50%, #4338ca 100%);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(14, 165, 233, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(96, 165, 250, 0.1) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Card hover effects */
.card-hover {
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.card-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.1), transparent);
    transition: left 0.5s ease;
}

.card-hover:hover::before {
    left: 100%;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), var(--shadow-glow);
}

/* Service cards special effects */
.service-card {
    transition: var(--transition-base);
    border: 1px solid transparent;
}

.service-card:hover {
    border-color: var(--sky-blue);
    background: linear-gradient(135deg, rgba(12, 74, 110, 0.3), rgba(30, 58, 138, 0.3));
}

/* Button animations */
.btn-primary {
    background: var(--sky-blue);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::after {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    background: #0284c7;
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.4);
    transform: translateY(-2px);
}

/* Stats counter animation */
.stat-number {
    animation: countUp 1s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile menu animations */
.mobile-menu {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.mobile-menu.hidden {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.mobile-menu.show {
    max-height: 500px;
    opacity: 1;
}

/* Form focus states */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--sky-blue);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
    transition: var(--transition-base);
}

/* Form validation */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown),
select:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown),
select:valid:not(:placeholder-shown) {
    border-color: #10b981;
}

/* Loading animation */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Knowledge Base grid animation */
.kb-item {
    transition: var(--transition-base);
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.kb-item:nth-child(1) { animation-delay: 0.1s; }
.kb-item:nth-child(2) { animation-delay: 0.2s; }
.kb-item:nth-child(3) { animation-delay: 0.3s; }
.kb-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Icon glow effect */
.icon-glow {
    transition: var(--transition-base);
}

.icon-glow:hover {
    filter: drop-shadow(0 0 8px var(--sky-blue));
    transform: scale(1.1);
}

/* Value proposition items */
.value-item {
    transition: var(--transition-base);
    position: relative;
}

.value-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 0;
    background: var(--sky-blue);
    transition: height 0.3s ease;
}

.value-item:hover::before {
    height: 100%;
}

.value-item:hover {
    padding-left: 1.5rem;
}

/* Navbar scroll effect */
.navbar-scrolled {
    background: rgba(12, 74, 110, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Footer links hover */
footer a {
    transition: var(--transition-base);
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--sky-blue);
    transition: width 0.3s ease;
}

footer a:hover::after {
    width: 100%;
}

/* Tooltip styles */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-gradient::before {
        animation: pulse 5s ease-in-out infinite;
    }

    .card-hover:hover {
        transform: translateY(-4px);
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none;
    }

    * {
        background: white !important;
        color: black !important;
    }
}

/* Accessibility improvements */
.focus-visible:focus {
    outline: 2px solid var(--sky-blue);
    outline-offset: 2px;
}

/* ========================================
   FASE 3: ANIMACIONES AVANZADAS
   ======================================== */

/* Fade in animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Stagger animation classes */
.animate-in {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.service-card.animate-in:nth-child(1) { animation-delay: 0.1s; }
.service-card.animate-in:nth-child(2) { animation-delay: 0.2s; }
.service-card.animate-in:nth-child(3) { animation-delay: 0.3s; }
.service-card.animate-in:nth-child(4) { animation-delay: 0.4s; }

.value-item.animate-in:nth-child(1) { animation-delay: 0.15s; }
.value-item.animate-in:nth-child(2) { animation-delay: 0.3s; }
.value-item.animate-in:nth-child(3) { animation-delay: 0.45s; }

/* Enhanced card hover with scale */
.card-hover {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-12px) scale(1.02);
}

/* Dark mode specific animations */
.dark .card-hover:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5),
                0 0 20px rgba(14, 165, 233, 0.2);
}

/* Floating animation for icons */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.icon-float {
    animation: float 3s ease-in-out infinite;
}

/* Shimmer effect for loading */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(14, 165, 233, 0.2) 50%,
        transparent 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Parallax effect for hero */
.parallax {
    will-change: transform;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Glow pulse animation */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(14, 165, 233, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(14, 165, 233, 0.6);
    }
}

.glow-pulse {
    animation: glowPulse 2s ease-in-out infinite;
}

/* Enhanced button ripple */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Text reveal animation */
@keyframes textReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.text-reveal {
    animation: textReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   FASE 4: VISUAL PLUS ENHANCEMENTS
   ======================================== */

/* Scroll Progress Bar */
#scroll-progress {
    will-change: width;
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
}

/* Gradient Blobs */
.gradient-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: blobFloat 20s ease-in-out infinite;
    will-change: transform;
}

.gradient-blob-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #0EA5E9 0%, transparent 70%);
    top: -250px;
    left: -250px;
    animation-delay: 0s;
}

.gradient-blob-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #8B5CF6 0%, transparent 70%);
    top: 50%;
    right: -200px;
    animation-delay: 7s;
}

.gradient-blob-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #3B82F6 0%, transparent 70%);
    bottom: -225px;
    left: 50%;
    animation-delay: 14s;
}

@keyframes blobFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-30px, 30px) scale(0.9);
    }
}

/* Standards Badges (Static) */
.standards-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1.5px solid rgba(14, 165, 233, 0.5);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    backdrop-filter: blur(8px);
    background: rgba(14, 165, 233, 0.1);
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.standards-badge:hover {
    border-color: rgba(14, 165, 233, 0.8);
    background: rgba(14, 165, 233, 0.2);
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
    transform: translateY(-2px);
}

/* Hero Enhanced Animations */
.hero-title {
    animation: heroFadeIn 1s ease-out 0.2s both;
}

.hero-subtitle {
    animation: heroFadeIn 1s ease-out 0.4s both;
}

.hero-standards {
    animation: heroFadeIn 1s ease-out 0.5s both;
}

.hero-cta {
    animation: heroFadeIn 1s ease-out 0.7s both;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Deployment Scenarios - Numbered Cards */
.scenario-card {
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.scenario-card:hover {
    transform: translateY(-8px);
}

.scenario-card-blue:hover {
    box-shadow: 0 20px 40px rgba(14, 165, 233, 0.3), 0 0 20px rgba(14, 165, 233, 0.2);
}

.scenario-card-purple:hover {
    box-shadow: 0 20px 40px rgba(147, 51, 234, 0.3), 0 0 20px rgba(147, 51, 234, 0.2);
}

.scenario-card-green:hover {
    box-shadow: 0 20px 40px rgba(22, 163, 74, 0.3), 0 0 20px rgba(22, 163, 74, 0.2);
}

.scenario-number {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.scenario-card:hover .scenario-number {
    transform: scale(1.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Enhanced 3D Card Effects */
.card-hover-3d {
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-hover-3d:hover {
    transform: rotateY(5deg) rotateX(5deg) scale(1.05);
}

/* Glow Trail Effect */
.glow-trail {
    position: relative;
    overflow: hidden;
}

.glow-trail::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.4), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    pointer-events: none;
}

.glow-trail:hover::before {
    width: 300px;
    height: 300px;
}

/* Network Canvas Overlay */
#network-canvas {
    opacity: 0.4;
    mix-blend-mode: screen;
}

.dark #network-canvas {
    opacity: 0.3;
}

/* Enhanced Micro-interactions */
.btn-primary {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.btn-primary:hover::before {
    width: 400px;
    height: 400px;
}

/* Section Background Patterns */
.pattern-dots {
    background-image: radial-gradient(circle, rgba(14, 165, 233, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.pattern-grid {
    background-image:
        linear-gradient(rgba(14, 165, 233, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Progressive Reveal Enhancement */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Children */
.stagger-children > * {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }

/* Enhanced Loading States */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(200, 200, 200, 0.2) 25%,
        rgba(200, 200, 200, 0.3) 50%,
        rgba(200, 200, 200, 0.2) 75%
    );
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s ease-in-out infinite;
}

@keyframes skeletonLoading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive Adjustments for Visual Plus */
@media (max-width: 768px) {
    .gradient-blob {
        filter: blur(60px);
    }

    .standards-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    .scenario-card {
        padding: 1.5rem;
    }

    .scenario-number {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }
}

/* Performance Optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
}
