/* Animated background grid */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: 
        radial-gradient(circle at 50% 0%, #111 0%, var(--bg-dark) 80%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 50px,
            rgba(0, 255, 255, 0.05) 50px,
            rgba(0, 255, 255, 0.05) 51px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 50px,
            rgba(0, 255, 255, 0.05) 50px,
            rgba(0, 255, 255, 0.05) 51px
        ),
        url('/images/background-tile.png');
    background-size: auto, auto, auto, 128px;
    background-repeat: repeat;
    min-height: 100vh;
    color: #e0e0e0;
    overflow-x: hidden;
    position: relative;
}

/* Animated scanning line */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    animation: scan 4s linear infinite;
    pointer-events: none;
    z-index: 100;
}

@keyframes scan {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100vh);
    }
}

/* Subtle pulse animation for background */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 255, 255, 0.03) 0%,
        transparent 40%
    );
    animation: pulse 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

/* Animation for elements appearing on scroll (if JS is added later) */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Respect the visitor's OS-level "reduce motion" preference.
   Neutralise the looping animations; do not remove the fixed layers —
   body::before and body::after are position:fixed and their painted
   background is part of the visual design. `animation: none` stops the
   movement while keeping the layer, so the default look is unchanged. */
@media (prefers-reduced-motion: reduce) {
    /* scan line (body::before) + pulse (body::after) — both defined in this
       file, above, so this block is later in the same document and wins */
    body::before,
    body::after {
        animation: none;
    }
    /* .tab.active::before lives in layout.css and .content also in layout.css;
       .hero-title lives in components.css. All three are loaded after this file
       (App.razor:11-14), so their own rules win on equal specificity and a
       `animation: none` here would never apply. Their reduced-motion
       neutralisation sits at the end of each owning sheet instead. */
}
