/* ============================================================
   FUTVISION — SHARED HAMBURGER + SIDE DRAWER NAVIGATION
   Linked from all pages. Self-contained. Variables fall back to
   the page palette but override-safe.
   ============================================================ */

:root {
    --menu-red: #e03c3c;
    --menu-white: #ffffff;
}

/* ---------- HAMBURGER TRIGGER ---------- */
.menu-toggle {
    position: fixed;
    top: 18px;
    left: 18px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    z-index: 120;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    transition: background 220ms ease;
}
.menu-toggle:hover { background: rgba(255, 255, 255, 0.04); }
.menu-toggle:focus-visible {
    outline: 1px solid rgba(255, 255, 255, 0.45);
    outline-offset: 2px;
}

.menu-toggle-bars {
    position: relative;
    width: 26px;
    height: 18px;
    display: block;
    pointer-events: none;
}
.menu-toggle-bars span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--menu-white);
    border-radius: 1px;
    transform-origin: center;
    transition: transform 320ms cubic-bezier(0.65, 0, 0.35, 1),
                opacity   180ms ease,
                top       320ms cubic-bezier(0.65, 0, 0.35, 1),
                background 220ms ease;
    will-change: transform, top, opacity;
}
.menu-toggle-bars span:nth-child(1) { top: 0; }
.menu-toggle-bars span:nth-child(2) { top: 8px; }
.menu-toggle-bars span:nth-child(3) { top: 16px; }

body.menu-open .menu-toggle-bars span:nth-child(1) {
    top: 8px;
    transform: rotate(45deg);
}
body.menu-open .menu-toggle-bars span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0.4);
}
body.menu-open .menu-toggle-bars span:nth-child(3) {
    top: 8px;
    transform: rotate(-45deg);
}

/* ---------- SCRIM (overlay behind drawer) ---------- */
.menu-scrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 320ms ease, visibility 320ms ease;
}
body.menu-open .menu-scrim {
    opacity: 1;
    visibility: visible;
}

/* ---------- DRAWER ---------- */
.site-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 360px;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    background:
        radial-gradient(ellipse 90% 40% at 0% 100%, rgba(224, 60, 60, 0.07), transparent 65%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 55%),
        #000;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    transform: translateX(-100%);
    transition: transform 380ms cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 110;
    overflow-y: auto;
    visibility: hidden;
    will-change: transform;
}
body.menu-open .site-menu {
    transform: translateX(0);
    visibility: visible;
}

/* Subtle pitch-line vertical texture */
.site-menu::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent 79px,
            rgba(255, 255, 255, 0.018) 79px,
            rgba(255, 255, 255, 0.018) 80px
        );
    pointer-events: none;
    z-index: 0;
}
/* Faint half-circle echo of the pitch motif */
.site-menu::after {
    content: '';
    position: absolute;
    left: -120px;
    bottom: -120px;
    width: 240px;
    height: 240px;
    border: 1px solid rgba(255, 255, 255, 0.045);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.site-menu-inner {
    position: relative;
    z-index: 1;
    padding: 84px 40px 40px;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* ---------- "MAIN MENU" LABEL ---------- */
.menu-label {
    font-family: 'Barlow Condensed', 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
    margin-bottom: 36px;
    position: relative;
    padding-left: 28px;
}
.menu-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 1px;
    background: rgba(255, 255, 255, 0.45);
}

/* ---------- NAV ITEMS ---------- */
.menu-nav { margin: 0; }
.menu-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.menu-nav li {
    opacity: 0;
    transform: translateX(-22px);
}
body.menu-open .menu-nav li {
    animation: menu-item-in 520ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
body.menu-open .menu-nav li:nth-child(1) { animation-delay: 130ms; }
body.menu-open .menu-nav li:nth-child(2) { animation-delay: 190ms; }
body.menu-open .menu-nav li:nth-child(3) { animation-delay: 250ms; }
body.menu-open .menu-nav li:nth-child(4) { animation-delay: 310ms; }
body.menu-open .menu-nav li:nth-child(5) { animation-delay: 370ms; }
body.menu-open .menu-nav li:nth-child(6) { animation-delay: 430ms; }
body.menu-open .menu-nav li:nth-child(7) { animation-delay: 490ms; }

@keyframes menu-item-in {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.menu-nav a {
    display: block;
    font-family: 'Barlow Condensed', 'Inter', sans-serif;
    font-weight: 500;
    font-size: 36px;
    line-height: 1.18;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    color: var(--menu-white);
    text-decoration: none;
    padding: 10px 0 10px 0;
    position: relative;
    transition: color 240ms ease,
                padding-left 280ms cubic-bezier(0.16, 1, 0.3, 1);
}
.menu-nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 0;
    height: 2px;
    background: var(--menu-red);
    transform: translateY(-50%);
    transition: width 280ms cubic-bezier(0.16, 1, 0.3, 1);
}
.menu-nav a:hover,
.menu-nav a:focus-visible {
    color: var(--menu-red);
    padding-left: 26px;
    outline: none;
}
.menu-nav a:hover::before,
.menu-nav a:focus-visible::before {
    width: 18px;
}

/* Active page — red dot, red text */
.menu-nav a.is-active {
    color: var(--menu-red);
    padding-left: 26px;
}
.menu-nav a.is-active::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--menu-red);
    box-shadow: 0 0 12px rgba(224, 60, 60, 0.6);
}
.menu-nav a.is-active:hover::before,
.menu-nav a.is-active:focus-visible::before {
    width: 8px; /* keep dot, not line */
}

/* ---------- DRAWER FOOTER ---------- */
.menu-footer {
    margin-top: auto;
    padding-top: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Barlow Condensed', 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 0.36em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.32);
    font-weight: 500;
}
.menu-footer .menu-footer-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(255,255,255,0.18), transparent);
}

/* ---------- BODY SCROLL LOCK ---------- */
body.menu-open {
    overflow: hidden;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 640px) {
    .menu-toggle { top: 12px; left: 12px; }
    .site-menu { width: 100vw; }
    .site-menu-inner { padding: 76px 28px 32px; }
    .menu-label {
        font-size: 10px;
        margin-bottom: 28px;
    }
    .menu-nav a {
        font-size: 30px;
        padding: 9px 0;
    }
    .menu-nav a:hover,
    .menu-nav a:focus-visible,
    .menu-nav a.is-active {
        padding-left: 22px;
    }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
    .menu-toggle,
    .menu-toggle-bars span,
    .site-menu,
    .menu-scrim,
    .menu-nav a,
    .menu-nav a::before {
        transition: none !important;
    }
    body.menu-open .menu-nav li {
        animation: none !important;
        opacity: 1;
        transform: none;
    }
}
