/* ========================================
   MATRIX DIGITAL RAIN EFFECT
   Lightweight CSS-only approach with Japanese characters
   For C-Suite Brand Agency hero section
======================================== */

.matrix-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    opacity: 0.25; /* More visible but still subtle */
}

/* Matrix character columns */
.matrix-column {
    position: absolute;
    top: -100%;
    font-family: 'Courier New', monospace;
    font-size: 14px; /* Slightly larger for visibility */
    color: #0f172a; /* Dark blue to match your theme */
    text-shadow: none;
    line-height: 1.2;
    white-space: nowrap;
    animation: matrix-rain linear infinite;
    will-change: transform;
}

/* Different column speeds for varied effect */
.matrix-column:nth-child(1) { animation-duration: 10s; left: 2%; }
.matrix-column:nth-child(2) { animation-duration: 15s; left: 6%; animation-delay: -2s; }
.matrix-column:nth-child(3) { animation-duration: 12.5s; left: 10%; animation-delay: -4s; }
.matrix-column:nth-child(4) { animation-duration: 18.75s; left: 14%; animation-delay: -1s; }
.matrix-column:nth-child(5) { animation-duration: 11.25s; left: 18%; animation-delay: -6s; }
.matrix-column:nth-child(6) { animation-duration: 16.25s; left: 22%; animation-delay: -3s; }
.matrix-column:nth-child(7) { animation-duration: 13.75s; left: 26%; animation-delay: -5s; }
.matrix-column:nth-child(8) { animation-duration: 17.5s; left: 30%; animation-delay: -2s; }
.matrix-column:nth-child(9) { animation-duration: 10s; left: 34%; animation-delay: -7s; }
.matrix-column:nth-child(10) { animation-duration: 20s; left: 38%; animation-delay: -4s; }
.matrix-column:nth-child(11) { animation-duration: 12.5s; left: 42%; animation-delay: -1s; }
.matrix-column:nth-child(12) { animation-duration: 15s; left: 46%; animation-delay: -8s; }
.matrix-column:nth-child(13) { animation-duration: 11.25s; left: 50%; animation-delay: -3s; }
.matrix-column:nth-child(14) { animation-duration: 17.5s; left: 54%; animation-delay: -6s; }
.matrix-column:nth-child(15) { animation-duration: 13.75s; left: 58%; animation-delay: -2s; }
.matrix-column:nth-child(16) { animation-duration: 16.25s; left: 62%; animation-delay: -5s; }
.matrix-column:nth-child(17) { animation-duration: 18.75s; left: 66%; animation-delay: -7s; }
.matrix-column:nth-child(18) { animation-duration: 10s; left: 70%; animation-delay: -4s; }
.matrix-column:nth-child(19) { animation-duration: 15s; left: 74%; animation-delay: -1s; }
.matrix-column:nth-child(20) { animation-duration: 12.5s; left: 78%; animation-delay: -9s; }
.matrix-column:nth-child(21) { animation-duration: 20s; left: 82%; animation-delay: -3s; }
.matrix-column:nth-child(22) { animation-duration: 11.25s; left: 86%; animation-delay: -6s; }
.matrix-column:nth-child(23) { animation-duration: 17.5s; left: 90%; animation-delay: -2s; }
.matrix-column:nth-child(24) { animation-duration: 13.75s; left: 94%; animation-delay: -8s; }
.matrix-column:nth-child(25) { animation-duration: 16.25s; left: 98%; animation-delay: -5s; }

/* Matrix rain animation */
@keyframes matrix-rain {
    0% {
        transform: translateY(-100vh);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Hero section modifications for Matrix effect - MINIMAL CHANGES */
#home {
    position: relative;
    overflow: hidden;
}

/* Add very subtle dark blue overlay to make matrix characters visible */
#home::before {
    content: '';
    position: absolute;
    top: -1px; /* overlap header boundary to eliminate hairline seam */
    left: 0;
    width: 100%;
    height: calc(100% + 1px);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.05) 0%, rgba(15, 23, 42, 0.1) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Ensure content stays above Matrix effect */
.hero-container {
    position: relative;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .matrix-background {
        opacity: 0.15; /* More visible on mobile */
    }
    
    .matrix-column {
        font-size: 12px; /* Readable on mobile */
    }
    
    /* Reduce number of columns on mobile for performance */
    .matrix-column:nth-child(n+13) {
        display: none;
    }
}
