/* ===================================
   NERCODING - Custom Styles
   =================================== */

/* CSS Variables */
:root {
    --nc-cyan: #00D4FF;
    --nc-blue: #3B82F6;
    --nc-purple: #8B5CF6;
    --nc-dark: #0A0A0A;
    --nc-gradient: linear-gradient(135deg, #00D4FF 0%, #3B82F6 50%, #8B5CF6 100%);
}

/* ===================================
   Base Styles
   =================================== */

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Font Classes */
.font-heading {
    font-family: 'Space Grotesk', sans-serif;
}

.font-body {
    font-family: 'Inter', sans-serif;
}

/* ===================================
   Custom Gradient Classes
   =================================== */

.bg-gradient-brand {
    background: linear-gradient(135deg, #00D4FF 0%, #3B82F6 50%, #8B5CF6 100%);
}

.bg-gradient-brand-hover:hover {
    background: linear-gradient(135deg, #00D4FF 0%, #6366F1 50%, #A855F7 100%);
}

.text-gradient {
    background: linear-gradient(135deg, #00D4FF 0%, #3B82F6 50%, #8B5CF6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===================================
   Animations
   =================================== */

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Float Delayed */
@keyframes float-delayed {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

.animate-float-delayed {
    animation: float-delayed 5s ease-in-out infinite;
    animation-delay: 1s;
}

/* Float Slow */
@keyframes float-slow {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float-slow {
    animation: float-slow 8s ease-in-out infinite;
    animation-delay: 2s;
}

/* Pulse Glow */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 212, 255, 0.8);
    }
}

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

/* Gradient Shift */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 15s ease infinite;
}

/* Spin Slow */
@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

/* ===================================
   Header Styles
   =================================== */

#header {
    transition: all 0.3s ease;
}

#header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.dark #header.scrolled {
    background: rgba(10, 10, 10, 0.95);
}

/* Navigation Links */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #00D4FF, #8B5CF6);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ===================================
   Glassmorphism Effects
   =================================== */

.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===================================
   Card Hover Effects
   =================================== */

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.15);
}

/* ===================================
   Button Styles
   =================================== */

.btn-gradient {
    background: linear-gradient(135deg, #00D4FF 0%, #3B82F6 50%, #8B5CF6 100%);
    background-size: 200% 200%;
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    background-position: 100% 0;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

/* ===================================
   Preloader
   =================================== */

#preloader {
    transition: opacity 0.5s ease;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

/* ===================================
   Back to Top Button
   =================================== */

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* ===================================
   FAQ Accordion
   =================================== */

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-item.active .faq-content {
    display: block;
}

/* ===================================
   Swiper Customization
   =================================== */

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #CBD5E1;
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background: linear-gradient(135deg, #00D4FF, #8B5CF6);
    width: 30px;
    border-radius: 5px;
}

/* ===================================
   Custom Scrollbar
   =================================== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dark ::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00D4FF, #8B5CF6);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #00D4FF, #6366F1);
}

/* ===================================
   Selection Color
   =================================== */

::selection {
    background: rgba(0, 212, 255, 0.3);
    color: inherit;
}

/* ===================================
   Form Styles
   =================================== */

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ===================================
   Counter Animation Style
   =================================== */

.counter {
    display: inline-block;
}

/* ===================================
   Responsive Adjustments
   =================================== */

@media (max-width: 768px) {
    .animate-float,
    .animate-float-delayed,
    .animate-float-slow {
        animation: none;
    }
}

/* ===================================
   Dark Mode Transitions
   =================================== */

* {
    transition-property: background-color, border-color, color;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}

/* Exclude animations from transition */
.animate-float,
.animate-float-delayed,
.animate-float-slow,
.animate-spin-slow,
.animate-pulse-glow {
    transition: none;
}

/* ===================================
   AOS Animation Overrides
   =================================== */

[data-aos] {
    pointer-events: auto !important;
}

/* 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;
    }

    [data-aos] {
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* ===================================
   Hero Dashboard Animations
   =================================== */

/* Dashboard Glow Effect */
@keyframes hero-dashboard-glow {
    0%, 100% {
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 30px rgba(0, 212, 255, 0.1);
    }
    50% {
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 50px rgba(0, 212, 255, 0.2);
    }
}

.hero-dashboard-glow {
    animation: hero-dashboard-glow 4s ease-in-out infinite;
}

/* Live Indicator Pulse */
@keyframes hero-live-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.hero-live-dot {
    animation: hero-live-pulse 1.5s ease-in-out infinite;
}

/* Status Indicator Pulse */
@keyframes hero-status-pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 currentColor;
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 0 4px transparent;
    }
}

.hero-status-pulse {
    animation: hero-status-pulse 2s ease-in-out infinite;
}

/* Animation Delays */
.hero-delay-1 { animation-delay: 0.3s; }
.hero-delay-2 { animation-delay: 0.6s; }
.hero-delay-3 { animation-delay: 0.9s; }

/* Wave Animation */
@keyframes hero-wave {
    0% {
        d: path("M0,25 Q25,10 50,25 T100,25 T150,25 T200,25");
    }
    25% {
        d: path("M0,25 Q25,35 50,20 T100,30 T150,20 T200,25");
    }
    50% {
        d: path("M0,25 Q25,15 50,30 T100,20 T150,30 T200,25");
    }
    75% {
        d: path("M0,25 Q25,30 50,15 T100,35 T150,15 T200,25");
    }
    100% {
        d: path("M0,25 Q25,10 50,25 T100,25 T150,25 T200,25");
    }
}

.hero-wave-path {
    animation: hero-wave 3s ease-in-out infinite;
}

/* Wave Dot Movement */
@keyframes hero-wave-dot-move {
    0%, 100% { cy: 25; }
    25% { cy: 20; }
    50% { cy: 30; }
    75% { cy: 15; }
}

.hero-wave-dot {
    animation: hero-wave-dot-move 3s ease-in-out infinite;
}

/* Gauge Fill Animation */
@keyframes hero-gauge-animate {
    0% { stroke-dasharray: 0 126; }
    100% { stroke-dasharray: 94 126; }
}

.hero-gauge-fill {
    animation: hero-gauge-animate 2s ease-out forwards;
}

/* Machine Blink Animation */
@keyframes hero-machine-blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.hero-machine-blink {
    animation: hero-machine-blink 2s ease-in-out infinite;
}

/* Data Stream Animation */
@keyframes hero-data-stream {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(300%);
    }
}

.hero-data-stream {
    animation: hero-data-stream 2s linear infinite;
}

/* Hero Counter Animation */
@keyframes hero-counter-fade {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.hero-counter {
    animation: hero-counter-fade 0.5s ease-out forwards;
}
