/* Header variables */
:root {
    --header-height: 72px;
    --header-height-mobile: 64px;
    --text-color: #FFFFFF;
    --mobile-menu-bg: rgba(0, 0, 0, 0.95);
    --transition-speed: 300ms;
}

/* ============================================
   Header — fixed, fully transparent (no black bar)
   ============================================ */
.stripe-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    background: transparent;
    border: none;
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

/* Hide header (scroll-down past hero) */
.stripe-header.header-hidden {
    transform: translateY(-220px);
}

/* ============================================
   Layout — CSS grid: 1fr auto 1fr → true center pill
   ============================================ */
.header-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

/* ============================================
   1. Logo — left column, strong Red Bull presence
   ============================================ */
.header-logo {
    text-decoration: none;
    z-index: 1002;
    justify-self: start;
}

.header-logo:hover {
    opacity: 0.85;
}

.logo-img {
    height: 160px;
    width: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ============================================
   2. Pill Nav — center column, true viewport center
   ============================================ */
.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 5px 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    justify-self: center;
}

.nav-link {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 999px;
    transition: background 0.25s ease, color 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* 3. Right column — empty spacer for balance, holds hamburger on mobile */
.header-container>.mobile-toggle {
    justify-self: end;
}

/* ============================================
   Mobile Toggle
   ============================================ */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    padding: 0;
    z-index: 1002;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background-color: white;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ============================================
   Mobile Menu Overlay
   ============================================ */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: var(--mobile-menu-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1001;
    padding: 80px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.mobile-menu-overlay.active {
    right: 0;
}

.mobile-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 500;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 16px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu-overlay.active .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-overlay.active .mobile-nav-link:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-menu-overlay.active .mobile-nav-link:nth-child(2) {
    transition-delay: 0.15s;
}

.mobile-menu-overlay.active .mobile-nav-link:nth-child(3) {
    transition-delay: 0.2s;
}

/* Active Hamburger Animation */
.mobile-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ============================================
   Responsive — ≤ 1023px
   ============================================ */
@media (max-width: 1023px) {
    .header-nav {
        display: none;
    }

    .header-container {
        grid-template-columns: 1fr auto;
    }

    .mobile-toggle {
        display: flex;
    }

    .stripe-header {
        height: var(--header-height-mobile);
    }

    .logo-img {
        height: 110px;
        margin-left: -5px;
        /* slight adjustment for massive size */
    }
}