
/* =========================================
   INDEX PAGE SPECIFIC STYLES
   ========================================= */

/* Hero Split Section */
#hero-split {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative; /* Required for the fade effect overlay */
}

/* The fade transition from hero to the about section (Purple to Black) */
#hero-split::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 180px;
    background: linear-gradient(to bottom, transparent 0%, rgba(63, 42, 86, 0.3) 60%, var(--surface-bg) 100%);
    z-index: 5; /* Above overlays, below text */
    pointer-events: none;
}

.split-half {
    position: relative;
    flex: 1;
    display: flex;
    overflow: hidden;
    cursor: pointer; /* the whole half is clickable, not just the button */
}

/* Adding a subtle separator line between the two photos */
.split-half:first-child {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.bg-img {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    transition: transform 0.6s ease;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    transition: background-color 0.4s ease;
}

/* Base states: mostly transparent to show the photo, slightly dark at bottom for text */
.overlay-kart { background-color: rgba(12, 10, 16, 0.3); }
.overlay-sim { background-color: rgba(12, 10, 16, 0.3); }

/* Hover states: Apply the specific tint color */
@media (min-width: 900px) {
    #hero-split {
        flex-direction: row; 
    }
    
    .split-half:hover .overlay-kart { background-color: rgba(107, 69, 150, 0.55); }
    .split-half:hover .overlay-sim { background-color: rgba(42, 86, 255, 0.45); }
    
    .split-half:hover .bg-img {
        transform: scale(1.04); 
    }
}

/* Text Content Positioning */
.split-content {
    position: absolute;
    bottom: 12%; 
    z-index: 10; /* Ensures text stays above the fade gradient */
    padding: 2rem 4rem;
    width: 100%;
}

.content-left {
    text-align: left;
    left: 0;
}

.content-right {
    text-align: right;
    right: 0;
}

.split-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.split-desc {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

/* Presentation Section */
#about-preview-section {
    padding: 6rem 2rem;
    text-align: center;
    background-color: var(--surface-bg);
    position: relative; 
    overflow: hidden; 
}

#bg-watermark-rkj {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.3);
    width: 100%;
    max-width: 1200px;
    opacity: 0.04; 
    pointer-events: none;
    z-index: 0; 
}

#about-content-wrapper {
    position: relative;
    z-index: 10; 
}

#about-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: var(--accent-kart);
}

#about-text-container {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-muted);
}

/* Sponsors Section */
#sponsors-section {
    padding: 5rem 2rem;
    text-align: center;
    background-color: var(--dark-bg);
}

#sponsors-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 3rem;
}

#sponsors-cloud {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto 3rem auto;
    align-items: center;
}

.sponsor-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: background 0.3s;
    text-decoration: none;
}

.sponsor-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sponsor-logo {
    width: 100px;
    height: 80px; 
}

.sponsor-name {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* =========================================
   SPLASH SCREEN LOADER
   ========================================= */

/* Prevent scrolling while loader is active */
body.no-scroll {
    overflow: hidden;
}

#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--dark-bg);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

/* Container to superimpose elements perfectly */
.splash-logo-container {
    position: relative;
    width: 80%;
    max-width: 600px;
}

.splash-logo {
    width: 100%;
    display: block;
}

/* Base state: "LED turned off" */
.base-logo {
    opacity: 0.15; 
}

/* Sweeping state: "LED turned on" */
.sweep-logo {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 1;
    
    /* Adds a glowing aura to the white light */
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
    
    /* Animates a diagonal clipping mask across the image */
    animation: light-sweep 1.8s ease-in-out infinite;
}

/* Move the diagonal polygon from left to right */
@keyframes light-sweep {
    0% {
        /* Polygon points: Top-Left, Top-Right, Bottom-Right, Bottom-Left */
        clip-path: polygon(-40% 0%, -20% 0%, -40% 100%, -60% 100%);
    }
    100% {
        clip-path: polygon(140% 0%, 160% 0%, 140% 100%, 120% 100%);
    }
}

/* Class added via JS to trigger the fade out */
.splash-hidden {
    opacity: 0;
    visibility: hidden;
}


/* =========================================
   RESPONSIVE (Mobile First / Adjustments)
   ========================================= */
@media (max-width: 899px) {
    #hero-split {
    padding-top: 140px; 
    }
    /* Header adjustments */
    #main-header {
        padding: 1rem 1.5rem;
    }
    
    #logo-container {
        width: 90px;
        height: 40px;
    }
    
    /* Hero Section Text & Spacing */
    .split-content {
        padding: 1.5rem;
        bottom: 5%;
        text-align: center; /* Center text on mobile for balance */
    }
    
    .content-left, .content-right {
        text-align: center;
    }
    
    .split-title {
        font-size: 2.2rem;
        margin-bottom: 0.2rem;
    }
    
    .split-desc {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .btn-solid {
        padding: 0.8rem 2rem;
        font-size: 0.85rem;
    }
    
    /* Remove vertical line separator on stacked layout */
    .split-half:first-child {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    /* Adjust the fade height for smaller screens */
    #hero-split::after {
        height: 120px;
    }
    
    /* About & Sponsors adjustments */
    #about-preview-section {
        padding: 4rem 1.5rem;
    }
    
    #about-text-container {
        font-size: 1.05rem;
    }
    
    #sponsors-section {
        padding: 3rem 1.5rem;
    }
}