:root {
    --bg-color: #0a0a0a;
    --text-color: #ffffff;
    --accent-color: #ffffff;
    
    /* The "Expensive" Easing */
    --ease-editorial: cubic-bezier(0.6, 0.05, 0.01, 0.99);
    
    /* Glassmorphism Settings */
    --glass-bg: rgba(10, 10, 10, 0.85);
    --glass-blur: 20px;
}

body {
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    /* Height handled by content in HTML for demo */
}

/* --- 1. THE TRIGGER --- */
.menu-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    background: none;
    border: none;
    cursor: pointer;
    width: 50px;
    height: 50px;
    padding: 0;
    mix-blend-mode: difference; /* Ensures visibility on light/dark backgrounds */
}

.hamburger-box {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.line {
    position: absolute;
    left: 0;
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    transition: transform 0.6s var(--ease-editorial), top 0.6s var(--ease-editorial);
}

.line.top { top: 35%; }
.line.bottom { top: 65%; }

/* Trigger Active State (Morph to X) */
.menu-toggle[aria-expanded="true"] .line.top {
    top: 50%;
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .line.bottom {
    top: 50%;
    transform: rotate(-45deg);
}

/* --- 2. THE OVERLAY --- */
.menu-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    z-index: 999;
    
    /* Center Content */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Hidden State */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s var(--ease-editorial), visibility 0.6s step-end;
}

/* Overlay Active State */
.menu-overlay.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s var(--ease-editorial), visibility 0s;
}

/* --- 3. THE CONTENT --- */
.menu-content {
    width: 100%;
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.menu-list li {
    overflow: hidden; /* Masks the slide-up animation */
    margin-bottom: 1rem;
}

.menu-list a {
    display: block;
    font-size: clamp(3rem, 8vw, 6rem); /* Massive, responsive type */
    font-weight: 800;
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.1;
    
    /* Animation Initial State: Pushed down and invisible */
    transform: translateY(120%) skewY(10deg);
    opacity: 0;
    transition: transform 0.8s var(--ease-editorial), opacity 0.8s var(--ease-editorial), color 0.3s ease;
}

/* --- 4. THE ANIMATION (Staggered Entrance) --- */
.menu-overlay.is-active .menu-list a {
    transform: translateY(0) skewY(0);
    opacity: 1;
    /* Delay calculation based on inline CSS variable --i */
    transition-delay: calc(0.1s * var(--i));
}

/* --- 5. FOCUS/HOVER EFFECTS --- */
.menu-list:hover a {
    opacity: 0.25; /* Dim all items */
    filter: blur(2px);
}

.menu-list a:hover {
    opacity: 1; /* Highlight target */
    filter: blur(0);
    transform: scale(1.05); /* Subtle zoom */
}

/* Remove default focus outline and add custom for accessibility */
.menu-toggle:focus-visible,
.menu-list a:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
}