/* ============================================
   ECPSOLUTIONS INC - Shared Base Styles
   Consolidates resets, background, particles,
   accessibility (skip link, focus, reduced motion)
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #000000;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================
   Accessibility: Skip Link & Focus
   ============================================ */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100000;
    padding: 0.75rem 1.25rem;
    background: #ffffff;
    color: #000000;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 8px 0;
}

.skip-link:focus {
    left: 0;
    outline: 3px solid #a855f7;
    outline-offset: 2px;
}

:focus-visible {
    outline: 2px solid #a855f7;
    outline-offset: 3px;
    border-radius: 4px;
}

/* Hide focus on click but keep it for keyboard */
:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================
   AI Background (shared across pages)
   ============================================ */
.ai-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: orbFloat 20s ease-in-out infinite;
}

.gradient-orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.gradient-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
    bottom: -150px;
    left: -100px;
    animation-delay: -7s;
}

.gradient-orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 30px) scale(1.02); }
}

.particles {
    position: absolute;
    inset: 0;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(168, 85, 247, 0.6);
    border-radius: 50%;
    animation: particleFloat 15s linear infinite;
}

@keyframes particleFloat {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) scale(1); opacity: 0; }
}

.neural-network {
    position: absolute;
    inset: 0;
    opacity: 0.15;
}

/* (Side-rail auto-hide handled by loader.js via direct inline-style
   manipulation. No CSS class needed — direct style.opacity / .transform
   on the rail element, with smooth transition set inline by JS.) */

/* ============================================
   Reduced Motion Support
   Disables decorative motion for users who request it.
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .gradient-orb,
    .particle,
    .neural-network,
    .cube,
    .ai-orb-shell,
    .ai-orb-rings,
    .ai-orb-mesh,
    .ai-orb-core,
    .ai-orb-node-1,
    .ai-orb-node-2,
    .ai-orb-node-3 {
        animation: none !important;
    }

    html {
        scroll-behavior: auto;
    }
}
