/* Import Google Fonts: Bebas Neue for headers, Inter for normal text */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;600&display=swap');

body { 
    margin: 0; 
    font-family: 'Inter', sans-serif; 
    background: #111;
}

/* The Floating Pill Navigation */
nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 10px 30px; 
    background: #fff; 
    /* Detach from top, center it, and make it float */
    position: fixed; 
    top: 25px; 
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1400px;
    z-index: 100;
    border-radius: 50px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.logo-img { 
    height: 45px; 
    display: block;
}

.nav-links a { 
    margin-left: 35px; 
    text-decoration: none; 
    color: #1a1a1a; 
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 1px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #666;
}

/* Hero Section */
#hero {
    position: relative;
    height: 100vh; /* Pushed to 100% viewport height for full immersion */
    display: flex;
    align-items: flex-end; 
    padding: 5vw;
    overflow: hidden;
}

#hero video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    z-index: -2;
}

/* Gradient overlay so the video fades to dark at the bottom behind the text */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.7) 100%); 
    z-index: -1;
}

/* Heavy Typography */
.hero-content {
    z-index: 1;
    color: #fff;
    max-width: 1000px;
    padding-bottom: 2vh;
}

.hero-content h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 8rem; /* Massive scale */
    margin: 0;
    line-height: 0.85;
    letter-spacing: 2px;
}

.hero-content p {
    font-size: 1.5rem;
    margin-top: 20px;
    font-weight: 300;
    letter-spacing: 1px;
}
/* White Text Section */
.white-section {
    background: #ffffff;
    color: #1a1a1a;
    padding: 120px 5vw; /* Generous top/bottom padding to match the reference */
    text-align: center;
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto; /* Centers the text block */
}

.white-section h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 5rem;
    margin-top: 0;
    margin-bottom: 30px;
    line-height: 1;
    letter-spacing: 1px;
}

.white-section p {
    font-size: 1.4rem;
    line-height: 1.7;
    font-weight: 300;
    color: #444;
}


/* Black Sponsors Section */
.black-section {
    background: #050505; /* A very deep grey/black to avoid pure harsh #000 */
    color: #ffffff;
    padding: 120px 5vw;
    text-align: center;
}

.black-section h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4.5rem;
    margin-top: 0;
    margin-bottom: 60px;
    letter-spacing: 2px;
}

/* The 3-Column Forced Grid */
.sponsor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Forces exactly 3 columns (2x3 layout) */
    gap: 40px; 
    max-width: 1200px; /* Widened from 1000px to give them room to grow */
    margin: 0 auto;
}

/* Reduced padding so the image itself claims more area */
.sponsor-box {
    padding: 15px; 
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The 3-Column Forced Grid */
.sponsor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* The 3 columns for your 2x3 layout */
    gap: 50px; 
    max-width: 1000px; 
    margin: 0 auto;
    justify-items: center; /* Centers the box inside the grid cell */
    align-items: center;
}

.sponsor-box {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* The Safety Valve for Image Size */
.sponsor-box img {
    width: 100%; 
    max-width: 180px; /* <--- This absolutely prevents them from getting huge */
    height: auto;
    display: block;
    filter: brightness(0) invert(1); 
    opacity: 0.6; 
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.sponsor-box:hover img {
    opacity: 1;
    transform: scale(1.05); 
}

/* Phone & Tablet screen sizing */
@media (max-width: 768px) {
    .sponsor-grid {
        grid-template-columns: repeat(2, 1fr); /* Snaps to 2 columns on mobile */
        gap: 30px;
    }
    .sponsor-box img {
        max-width: 140px; /* Scales down slightly for phones */
    }
}

/* Force pure white logos */
.sponsor-box img {
    max-width: 100%;
    height: auto;
    display: block;
    
    /* The magic trick: drops lightness to 0 (black), then inverts it (pure white) */
    filter: brightness(0) invert(1); 
    
    opacity: 0.6; /* Keeps them slightly muted until hovered */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.sponsor-box:hover img {
    opacity: 1;
    transform: scale(1.05); /* Optional: tiny pop effect on hover */
}
/* Mountain Divider */
.mountain-divider {
    width: 100%;
    height: 90px; /* Controls how tall the mountains appear */
    background: #ffffff; /* Must match the section above it */
    line-height: 0;
    margin-bottom: -1px; /* Overlaps slightly to prevent a tiny white gap */
}

.mountain-divider svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Search Icon Hover */
.search-icon svg {
    transition: stroke 0.2s ease;
}
.search-icon:hover svg {
    stroke: #666;
}

/* Distinct Login Button */
.nav-actions {
    margin-left: 20px;
    border-left: 1px solid #eee; /* Creates a subtle visual separator */
    padding-left: 20px;
}

.login-btn {
    background: #1a1a1a;
    color: #ffffff;
    padding: 8px 24px;
    border-radius: 50px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    text-decoration: none;
    letter-spacing: 1px;
    transition: background 0.2s ease;
}

.login-btn:hover {
    background: #444;
}
/* 3D Kit Container */
.kit-container {
    perspective: 1200px; 
    width: 100%;
    max-width: 450px; /* Dialed back to fix the massive vertical gap */
    margin: 40px auto;
}

.kit-flipper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; 
    transform-style: preserve-3d;
    /* 8s total loop. ease-in-out makes the snap feel natural */
    animation: pauseAndFlip 8s infinite ease-in-out; 
}

/* The Pause-Flip-Pause Engine */
@keyframes pauseAndFlip {
    0%, 40%   { transform: rotateY(0deg); }     /* Show front, hold still */
    45%, 90%  { transform: rotateY(180deg); }   /* Fast flip to back, hold still */
    95%, 100% { transform: rotateY(360deg); }   /* Fast flip to front, complete loop */
}

.kit-front, .kit-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden; 
}

.kit-back {
    transform: rotateY(180deg);
}

.kit-front img, .kit-back img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0px 15px 25px rgba(0,0,0,0.15));
    /* Artificially zooms the image to bypass the invisible PNG padding */
    transform: scale(1.6); 
}




/* 4-Sided Bib Continuous Spin */
.bib-flipper-4 {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; 
    transform-style: preserve-3d;
    /* Exactly 8s to sync with the jersey and vest loops */
    animation: bibSpin4 8s infinite ease-in-out; 
}

/* We can keep the same bib-face styling */
.bib-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden; 
}

/* Set up the 4-sided square layout (90-degree increments) */
.bib-front { transform: rotateY(0deg); }
.bib-right { transform: rotateY(90deg); }
.bib-back  { transform: rotateY(180deg); }
.bib-left  { transform: rotateY(270deg); }

.bib-face img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0px 15px 25px rgba(0,0,0,0.15));
    transform: scale(1.6); 
}

/* 4-Step Rotation Engine (Synced to 8s) */
@keyframes bibSpin4 {
    0%, 15%   { transform: rotateY(0deg); }       /* Hold Front */
    25%, 40%  { transform: rotateY(-90deg); }     /* Flip to Right Side, Hold */
    50%, 65%  { transform: rotateY(-180deg); }    /* Flip to Back, Hold */
    75%, 90%  { transform: rotateY(-270deg); }    /* Flip to Left Side, Hold */
    100%      { transform: rotateY(-360deg); }    /* Fast flip to Front, Loop */
}

/* 3-Step Rotation Engine */
@keyframes bibSpin {
    0%, 28%   { transform: rotateY(0deg); }      /* Hold Front */
    33%, 61%  { transform: rotateY(-120deg); }   /* Flip to Side, Hold */
    66%, 94%  { transform: rotateY(-240deg); }   /* Flip to Back, Hold */
    100%      { transform: rotateY(-360deg); }   /* Fast flip to Front, Loop */
}


/* Update mobile query for the new section */
@media (max-width: 768px) {
    .white-section {
        padding: 80px 5vw;
    }
    .white-section h2 {
        font-size: 3.5rem;
    }
    .white-section p {
        font-size: 1.1rem;
    }
}

.sponsor-box img.keep-color {
    filter: none;
}
/* =========================================
   MEGA FOOTER STYLING
========================================= */
.site-footer {
    background-color: #050505;
    color: #fff;
    padding: 80px 5vw 40px 5vw;
    font-family: 'Inter', sans-serif;
    border-top: 1px solid #1a1a1a;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: 1px solid #222; 
    padding-bottom: 60px;
    margin-bottom: 40px;
}

/* THE FIX: Wrap tightly around text and center the whole grid */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, max-content);
    justify-content: center; 
    gap: 8vw; /* Uses viewport width to spread them out beautifully */
}

.footer-col h4 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    margin: 0 0 20px 0;
    letter-spacing: 1px;
}

.footer-col a {
    display: block;
    color: #888;
    text-decoration: none;
    margin-bottom: 12px;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: #fff;
}

/* Bottom Bar Styling */
.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-initiative, .footer-team {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #888;
    font-size: 0.95rem;
}

.team-avatars {
    display: flex;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #050505; 
    margin-left: -12px; 
    background-size: cover;
    background-position: center;
}

.team-avatars .avatar:first-child {
    margin-left: 0; 
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: repeat(2, max-content);
        gap: 50px;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr; /* Single column on phones */
        text-align: center; /* Centers the text for mobile */
        justify-content: center;
    }
    
    .footer-col a {
        display: inline-block; /* Helps with touch targets when centered */
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }
}

/* The overlapping circular profile pictures */
.team-avatars {
    display: flex;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #050505; /* Creates the cut-out effect between overlapping images */
    margin-left: -12px; /* The negative margin makes them overlap */
    background-size: cover;
    background-position: center;
}

.team-avatars .avatar:first-child {
    margin-left: 0; /* Prevents the first image from shifting left */
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
    }
}

/* Hide hamburger by default on desktop */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #1a1a1a;
    border-radius: 2px;
    transition: 0.3s;
}

/* Mobile Breakpoint - Triggered when the screen gets too narrow */
@media (max-width: 950px) {
    .hamburger {
        display: flex; /* Show the icon */
    }

    .nav-actions {
        display: none; /* Hides the login button to save space */
    }

    .nav-links {
        display: none; /* Hide the links by default */
        position: absolute;
        top: 110%; /* Drops it just below your main nav pill */
        left: 0;
        width: 100%;
        background: #fff;
        border-radius: 20px;
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    }

    /* This class gets toggled by JavaScript */
    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        margin: 15px 0;
        text-align: center;
    }
}
.mountain-img-divider {
    width: 100%;
    aspect-ratio: 3327 / 1216; 
    
    /* THE TRICK: Layer a gradient ON TOP of the image */
    background: 
        linear-gradient(to bottom, rgba(5, 5, 5, 0) 70%, #050505 98%), 
        url('images/mountainfade.png');
    
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom center;
    
    margin-top: -100px; 
    margin-bottom: -2px; /* Slight overlap to prevent 1px gaps */
    position: relative;
    z-index: 5;
}
/* Responsive adjustment for small screens */
@media (max-width: 768px) {
    .mountain-img-divider {
        margin-top: -40px; /* Less overlap on mobile so text doesn't get buried */
    }
}