/* 
   Advanced Background and Interactions 
   Contains: Spotlight, Grid Mesh, and Magnetic Effects
*/

:root {
    --spotlight-color: rgba(255, 255, 255, 0.05);
    --grid-color: rgba(255, 255, 255, 0.03);
}

/* Dynamic Grid Background */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
}

/* Mouse Spotlight Glow */
.spotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--spotlight-color) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
    mix-blend-mode: screen;
}

/* Bento Grid Layout for Why Choose Us */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    gap: 1.5rem;
    margin-top: 3rem;
}

.bento-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 250px;
}

.bento-item:hover {
    border-color: var(--accent-blue);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Specific Bento Sizing */
.bento-item.tall {
    grid-row: span 2;
}

.bento-item.wide {
    grid-column: span 2;
}

.bento-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff, #555);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Magnetic Button Transition */
.btn-magnetic {
    display: inline-block;
}

/* Text Selection Theme */
::selection {
    background: var(--accent-blue);
    color: #fff;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), #fff);
    z-index: 2000;
    width: 0%;
    transition: width 0.1s;
}

@media (max-width: 992px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-item.wide,
    .bento-item.tall {
        grid-column: span 1;
        grid-row: span 1;
    }
}