body {
    background-color: #050505;
    color: white;
    overflow-x: hidden;
    width: 100%;
}

/* --- PRELOADER STYLES --- */
#preloader {
    position: fixed;
    inset: 0;
    background: #050505;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

body.loading {
    overflow: hidden;
}

/* --- Custom Cursor --- */
#cursor {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #eb0028;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
    mix-blend-mode: difference;
}

#cursor.hovered {
    width: 60px;
    height: 60px;
    background-color: rgba(235, 0, 40, 0.2);
    border-color: transparent;
    mix-blend-mode: normal;
}

@media (hover: hover) and (pointer: fine) {
    body:not(.loading) {
        cursor: none;
    }

    #cursor {
        display: block;
    }
}

/* --- BACKGROUND SYSTEM --- */
.neon-split {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 400vh;
    background: linear-gradient(to bottom, #ffffff 0%, #ffffff 50%, #000000 50%, #000000 100%);
    box-shadow: 0 0 10px #fff, 0 0 25px rgba(255, 255, 255, 0.8);
    z-index: -3;
    opacity: 0.65;
    transform: translate(-50%, -50%) rotate(40deg);
}

.knight-container {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
}

.knight-bg {
    position: absolute;
    width: 45vw;
    height: auto;
    opacity: 0.22;
    filter: grayscale(100%);
}

.knight-left {
    bottom: -10%;
    left: -10%;
    transform: rotate(5deg);
    animation: float-knight-l 12s ease-in-out infinite;
}

.knight-right {
    top: 5%;
    right: -10%;
    transform: rotate(-10deg);
    animation: float-knight-r 15s ease-in-out infinite;
}

@keyframes float-knight-l {

    0%,
    100% {
        transform: translateY(0) rotate(5deg);
    }

    50% {
        transform: translateY(-30px) rotate(8deg);
    }
}

@keyframes float-knight-r {

    0%,
    100% {
        transform: translateY(0) rotate(-10deg);
    }

    50% {
        transform: translateY(30px) rotate(-12deg);
    }
}

/* --- CHESSBOARD GRID LOGIC --- */
.partner-tile {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    transition: all .5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    padding: 1.25rem;
}

.partner-logo {
    max-width: 85%;
    max-height: 80%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.partner-tile:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 1);
    z-index: 20;
    border-color: rgba(255, 255, 255, 0.4);
}


/* --- TABLET POSITIONING (M) // EXPERIMENT SPACE --- */
@media (min-width: 768px) and (max-width: 1024px) {
    .knight-bg {
        /* Scaled down 30% from desktop (approx 31.5vw) as discussed */
        width: 31.5vw; 
        opacity: 0.15;
    }

    .knight-left {
        /* WHITE KNIGHT: ADJUST THESE VALUES */
        bottom: 20%; 
        left: -10%;
    }

    .knight-right {
        /* BLACK KNIGHT: ADJUST THESE VALUES */
        top: 30%; 
        right: -5%;
    }
}
/* MOBILE RESPONSIVE FIXES */
@media (max-width: 767px) {

    html,
    body {
        overflow-x: hidden;
        width: 100%;
    }

    main h1 {
        font-size: 3rem !important;
    }

    /* Grid Checkerboard */
    .partner-tile:nth-child(4n+1),
    .partner-tile:nth-child(4n+4) {
        background: #0d0d0d;
    }

    .partner-tile:nth-child(4n+2),
    .partner-tile:nth-child(4n+3) {
        background: #4a0002;
    }

    /* Knight Positioning Fixes */
    .knight-bg {
        width: 90vw;
        opacity: 0.1;
    }

    .knight-left {
        bottom: 5%;
        left: 25%;
    }

    /* White: Top & Right */
    .knight-right {
        top: 5%;
        right: 35%;
    }

    /* Black: Bottom & Left */

    .neon-split {
        height: 400vh;
        opacity: 0.3;
    }
}

@media (min-width: 768px) {

    .partner-tile:nth-child(8n+1),
    .partner-tile:nth-child(8n+3),
    .partner-tile:nth-child(8n+6),
    .partner-tile:nth-child(8n+8) {
        background: #0d0d0d;
    }

    .partner-tile:nth-child(8n+2),
    .partner-tile:nth-child(8n+4),
    .partner-tile:nth-child(8n+5),
    .partner-tile:nth-child(8n+7) {
        background: #4a0002;
    }
    
}