/* DevBox Main Stylesheet */

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

/* Scroll animation base */
.scroll-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered card animation delays */
.scroll-animate.stagger-1 { transition-delay: 0.1s; }
.scroll-animate.stagger-2 { transition-delay: 0.2s; }
.scroll-animate.stagger-3 { transition-delay: 0.3s; }
.scroll-animate.stagger-4 { transition-delay: 0.4s; }
.scroll-animate.stagger-5 { transition-delay: 0.5s; }

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid #2E75B6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Form focus override for Tailwind */
input:focus, textarea:focus, select:focus {
    outline: none;
}

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

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

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Hero gradient animation */
@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

/* Selection color */
::selection {
    background: #2E75B6;
    color: white;
}

/* Button hover polish */
.btn-primary {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(46, 117, 182, 0.3);
}

/* Scroll-aware navbar */
.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar-transparent {
    background-color: transparent !important;
    border-bottom-color: transparent !important;
}

.nav-link-default {
    color: #6B7280;
}

.navbar-transparent .nav-link {
    color: #6B7280;
}

.navbar-transparent .nav-link:hover {
    color: #1B2A4A;
}

/* Terminal mockup */
.terminal-mockup {
    background: #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal-body {
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.8;
    color: #a0aec0;
    white-space: pre-wrap;
}

.terminal-body .keyword { color: #c792ea; }
.terminal-body .function { color: #82aaff; }
.terminal-body .string { color: #c3e88d; }
.terminal-body .comment { color: #546e7a; }

/* Services sticky jump nav */
.service-nav {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.service-nav::-webkit-scrollbar {
    display: none;
}

.service-nav-item {
    white-space: nowrap;
    transition: all 0.2s ease;
}

.service-nav-item.active {
    background-color: #2E75B6;
    color: white;
}

/* Character counter */
.char-counter {
    font-size: 0.75rem;
    color: #555;
    text-align: right;
    margin-top: 4px;
}

/* Success panel */
.success-panel {
    animation: fadeUp 0.5s ease-out;
}

/* Most Popular badge */
.popular-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: #2E75B6;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 16px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Hero network canvas */
#hero-network {
    pointer-events: auto;
}

/* Terminal typing cursor */
.terminal-cursor {
    animation: blink-cursor 1s step-end infinite;
    color: #82aaff;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* 3D tilt cards */
.tilt-card {
    transform-style: preserve-3d;
    will-change: transform;
    position: relative;
    overflow: hidden;
}

.tilt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle 200px at var(--glow-x, 50%) var(--glow-y, 50%),
        rgba(46, 117, 182, 0.12),
        transparent 70%
    );
    pointer-events: none;
    z-index: 1;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .scroll-animate {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .animate-gradient,
    .animate-float,
    .animate-pulse-soft,
    .terminal-cursor {
        animation: none;
    }

    .tilt-card {
        transform: none !important;
    }

    .tilt-card::before {
        opacity: 0.5;
        background: radial-gradient(circle at 50% 50%, rgba(46, 117, 182, 0.06), transparent 70%);
    }

    .btn-primary:hover {
        transform: none;
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
