/* ============================================
   AURORA BACKGROUND
   Version: 10.2 - Top Gradient Always Visible
   
   ИЗМЕНЕНИЯ v10.2:
   - Top darkening ::before остаётся ВСЕГДА
     (убран aurora-off override который скрывал его)
   - Это обеспечивает контраст для header icons
     и в hero mode, и в form mode
   ============================================ */

/* ===== CONTAINER ===== */
.aurora-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    
    background: linear-gradient(
        180deg,
        #080612 0%,
        #100c1e 15%,
        #1a1030 35%,
        #201540 50%,
        #1a1030 70%,
        #0e0a1a 90%,
        #080612 100%
    );
    
    transition: background 1.5s ease-in-out;
}

/* ===== TOP DARKENING — ALWAYS VISIBLE ===== */
.aurora-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 180px;
    z-index: 5;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(5, 4, 10, 0.85) 0%,
        rgba(5, 4, 10, 0.6) 30%,
        rgba(5, 4, 10, 0.25) 60%,
        transparent 100%
    );
    /* v10.2: НЕ скрывается при aurora-off */
}

/* ===== MESH — мягкие свечения ===== */
.aurora-mesh {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    filter: none;
    
    background:
        radial-gradient(
            ellipse 80% 55% at 50% 40%,
            rgba(160, 100, 200, 0.2) 0%,
            rgba(130, 70, 170, 0.1) 40%,
            transparent 70%
        ),
        radial-gradient(
            ellipse 50% 45% at 15% 35%,
            rgba(70, 90, 210, 0.12) 0%,
            transparent 60%
        ),
        radial-gradient(
            ellipse 45% 40% at 85% 45%,
            rgba(90, 160, 230, 0.1) 0%,
            transparent 55%
        ),
        radial-gradient(
            ellipse 60% 40% at 50% 80%,
            rgba(140, 80, 180, 0.08) 0%,
            transparent 60%
        );
}

/* ===== FORM MODE TOP GLOW ===== */
.aurora-mesh-form {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 2s ease-in-out, visibility 0s linear 2s;
    
    background: 
        radial-gradient(
            ellipse 60% 50% at 10% 0%,
            rgba(255, 182, 225, 0.2) 0%,
            rgba(249, 168, 212, 0.08) 40%,
            transparent 70%
        ),
        radial-gradient(
            ellipse 65% 55% at 50% 0%,
            rgba(167, 139, 250, 0.18) 0%,
            rgba(139, 92, 246, 0.06) 40%,
            transparent 70%
        ),
        radial-gradient(
            ellipse 55% 50% at 90% 0%,
            rgba(103, 232, 249, 0.18) 0%,
            rgba(59, 130, 246, 0.06) 40%,
            transparent 70%
        );
}

@keyframes aurora-form-breathe {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.03) translateY(2%); }
}

/* ===== BLOBS — HIDDEN ===== */
.aurora-orb {
    position: absolute;
    filter: none !important;
    mix-blend-mode: normal !important;
    will-change: auto;
    opacity: 0 !important;
    display: none !important;
}

.aurora-orb--primary,
.aurora-orb--secondary,
.aurora-orb--accent {
    display: none !important;
}

.aurora-particles {
    position: absolute;
    opacity: 0 !important;
    display: none !important;
}

/* ===== NOISE OVERLAY ===== */
.aurora-noise {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.04;
    mix-blend-mode: overlay;
    
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ===== STARS / DOTS ===== */
.aurora-noise::before,
.aurora-noise::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.aurora-noise::before {
    background-image: 
        radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.4) 50%, transparent 50%),
        radial-gradient(1px 1px at 25% 35%, rgba(255,255,255,0.3) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 45% 8%, rgba(255,255,255,0.5) 50%, transparent 50%),
        radial-gradient(1px 1px at 60% 25%, rgba(255,255,255,0.35) 50%, transparent 50%),
        radial-gradient(1px 1px at 75% 12%, rgba(255,255,255,0.4) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 88% 30%, rgba(255,255,255,0.45) 50%, transparent 50%),
        radial-gradient(1px 1px at 15% 55%, rgba(255,255,255,0.3) 50%, transparent 50%),
        radial-gradient(1px 1px at 35% 70%, rgba(255,255,255,0.35) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 55% 85%, rgba(255,255,255,0.4) 50%, transparent 50%),
        radial-gradient(1px 1px at 70% 65%, rgba(255,255,255,0.3) 50%, transparent 50%),
        radial-gradient(1px 1px at 85% 78%, rgba(255,255,255,0.35) 50%, transparent 50%),
        radial-gradient(1px 1px at 92% 55%, rgba(255,255,255,0.4) 50%, transparent 50%),
        radial-gradient(1px 1px at 8% 88%, rgba(255,255,255,0.3) 50%, transparent 50%),
        radial-gradient(1.5px 1.5px at 30% 92%, rgba(255,255,255,0.45) 50%, transparent 50%),
        radial-gradient(1px 1px at 65% 95%, rgba(255,255,255,0.35) 50%, transparent 50%),
        radial-gradient(1px 1px at 50% 45%, rgba(255,255,255,0.25) 50%, transparent 50%);
    opacity: 0.7;
}

.aurora-noise::after {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Cpath d='M3 1v4M1 3h4' stroke='rgba(255,255,255,0.25)' stroke-width='0.5'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Cpath d='M3 1v4M1 3h4' stroke='rgba(255,255,255,0.2)' stroke-width='0.5'/%3E%3C/svg%3E");
    background-position: 20% 25%, 75% 70%;
    background-size: 6px 6px;
    background-repeat: no-repeat;
    opacity: 0.6;
}

/* ===== SUBTLE SHIMMER ===== */
.aurora-container::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: radial-gradient(
        ellipse 50% 40% at 50% 35%,
        rgba(255, 255, 255, 0.02) 0%,
        transparent 60%
    );
    pointer-events: none;
}

/* ===== PERFORMANCE ===== */
@media (prefers-reduced-motion: reduce) {
    .aurora-orb,
    .aurora-particles {
        animation: none !important;
    }
}

/* ===== PAUSED STATE ===== */
.aurora-container.paused .aurora-orb,
.aurora-container.paused .aurora-particles {
    animation-play-state: paused !important;
}

/* ===== AURORA OFF ===== */
body.aurora-off .aurora-orb,
body.aurora-off .aurora-particles,
body.aurora-off .aurora-mesh {
    animation: none !important;
    will-change: auto !important;
}

body.aurora-off .aurora-container {
    pointer-events: none;
}

/* v10.2: Top darkening stays visible — NO override here */
