/**
 * ==============================================
 * HOME EPIC BACKGROUND - EXPERIÊNCIA CINEMATOGRÁFICA
 * ==============================================
 * 
 * Responsabilidade: Background épico para TODA a home
 * Inspirado no Porting Section (cheio de efeitos)
 * Efeitos: Canvas 3D, Depth Layers, Code Rain, Gradientes
 * 
 * @package Nuntius Theme
 * @version 2.0.0 EPIC
 */

/* ===== BODY DA HOME - REMOVE PADDING ===== */
body.home,
body.page-template-default {
    padding-top: 0 !important;
}

/* ===== BACKGROUND ÉPICO FULL SCREEN ===== */
.home-epic-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    z-index: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(88, 101, 242, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(114, 137, 218, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at top, #0a0a0f 0%, #0d1117 25%, #111827 50%, #0a0a0f 100%),
        linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 30%, #16213e 60%, #0f1419 100%);
    overflow: hidden;
    animation: homeBackgroundPulse 10s ease-in-out infinite;
}

@keyframes homeBackgroundPulse {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ===== CANVAS 3D PARA EFEITOS ===== */
.home-3d-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.4;
    pointer-events: none;
}

/* ===== DEPTH LAYERS ANIMADAS ===== */
.home-depth-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.home-depth-layer.layer-1 {
    background: radial-gradient(circle at 20% 80%, rgba(88, 101, 242, 0.15) 0%, transparent 60%);
    animation: homeDepthFloat1 12s ease-in-out infinite;
}

.home-depth-layer.layer-2 {
    background: radial-gradient(circle at 80% 20%, rgba(114, 137, 218, 0.12) 0%, transparent 60%);
    animation: homeDepthFloat2 15s ease-in-out infinite reverse;
}

.home-depth-layer.layer-3 {
    background: radial-gradient(circle at 50% 50%, rgba(67, 181, 129, 0.08) 0%, transparent 70%);
    animation: homeDepthFloat3 18s ease-in-out infinite;
}

@keyframes homeDepthFloat1 {
    0%, 100% { 
        transform: translate(0, 0) scale(1); 
        opacity: 0.15; 
    }
    50% { 
        transform: translate(30px, -30px) scale(1.1); 
        opacity: 0.25; 
    }
}

@keyframes homeDepthFloat2 {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg); 
        opacity: 0.12; 
    }
    50% { 
        transform: translate(-20px, 20px) rotate(3deg); 
        opacity: 0.2; 
    }
}

@keyframes homeDepthFloat3 {
    0%, 100% { 
        transform: scale(1) translateY(0); 
        opacity: 0.08; 
    }
    50% { 
        transform: scale(1.08) translateY(-15px); 
        opacity: 0.15; 
    }
}

/* ===== CODE RAIN MATRIX EFFECT ===== */
.home-code-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    overflow: hidden;
    pointer-events: none;
}

.code-line {
    position: absolute;
    top: -100px;
    width: 2px;
    height: 100px;
    background: linear-gradient(transparent, rgba(88, 101, 242, 0.8), transparent);
    animation: codeRainFall 5s linear infinite;
    opacity: 0.6;
}

.code-line:nth-child(1) { 
    left: 10%; 
    animation-delay: 0s; 
    background: linear-gradient(transparent, rgba(88, 101, 242, 0.8), transparent);
}

.code-line:nth-child(2) { 
    left: 25%; 
    animation-delay: 1.5s; 
    background: linear-gradient(transparent, rgba(114, 137, 218, 0.7), transparent);
}

.code-line:nth-child(3) { 
    left: 50%; 
    animation-delay: 3s; 
    background: linear-gradient(transparent, rgba(67, 181, 129, 0.6), transparent);
}

.code-line:nth-child(4) { 
    left: 75%; 
    animation-delay: 0.8s; 
    background: linear-gradient(transparent, rgba(250, 166, 26, 0.5), transparent);
}

.code-line:nth-child(5) { 
    left: 90%; 
    animation-delay: 2.2s; 
    background: linear-gradient(transparent, rgba(88, 101, 242, 0.8), transparent);
}

@keyframes codeRainFall {
    0% {
        top: -100px;
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* ===== CONTENT WRAPPER ===== */
.home-content-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
    padding-top: 80px; /* Espaço para topbar */
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .home-epic-background {
        background-attachment: scroll;
    }
    
    .home-code-rain {
        display: none; /* Melhor performance mobile */
    }
}
