/* ───────────────────────────────
   Menu Toggle Buttons
─────────────────────────────── */
.menu-toggle,
.menu-close {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #5b4b6a; /* brand aubergine */
    z-index: 1001;
    font-size: 2rem;
    padding: 0.25rem; /* touch target */
}

/* Dark mode toggle visibility */
[data-theme="dark"] .menu-toggle,
[data-theme="dark"] .menu-close {
    color: #c7bfd4;
}

/* ───────────────────────────────
   Fullscreen Menu (scroll-proof)
─────────────────────────────── */
.fullscreen-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* full viewport */
    overflow-y: auto; /* allow scroll */
    -webkit-overflow-scrolling: touch;

    display: block; /* important: no flex here */

    background-color: rgba(249, 246, 241, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    color: #2f2540;
    z-index: 1000;

    transform: translateX(-100%);
    opacity: 0;
    transition:
        transform 0.5s ease,
        opacity 0.5s ease;
    pointer-events: none;
}

/* Dark mode background */
[data-theme="dark"] .fullscreen-menu {
    background-color: rgba(30, 28, 33, 0.7);
    color: #eae6f1;
}

/* Open state */
.fullscreen-menu.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

/* Lock background scroll */
body.menu-open {
    overflow: hidden;
}

/* Inner wrapper handles padding and spacing */
.menu-inner {
    padding: 5rem 2rem 3rem;
    min-height: 100%; /* ensures enough height for scroll */
    box-sizing: border-box;
}

/* ───────────────────────────────
   Navigation Links
─────────────────────────────── */
.menu-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-nav li {
    position: relative;
    margin: 1.5rem 0;
    opacity: 0;
    transform: translateX(-30px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

/* Animate in each item sequentially */
.fullscreen-menu.open .menu-nav li {
    opacity: 1;
    transform: translateX(0);
}

.fullscreen-menu.open .menu-nav li:nth-child(1) {
    transition-delay: 0.1s;
}
.fullscreen-menu.open .menu-nav li:nth-child(2) {
    transition-delay: 0.2s;
}
.fullscreen-menu.open .menu-nav li:nth-child(3) {
    transition-delay: 0.3s;
}
.fullscreen-menu.open .menu-nav li:nth-child(4) {
    transition-delay: 0.4s;
}
.fullscreen-menu.open .menu-nav li:nth-child(5) {
    transition-delay: 0.5s;
}

.menu-nav a {
    font-size: 2rem;
    text-decoration: none;
    color: inherit; /* inherits from menu for dark/light */
    font-weight: bold;
}

/* Menu Descriptions */
.menu-desc {
    font-size: 1.2rem;
    font-weight: normal;
    color: inherit;
    margin-top: 0.2rem;
    margin-left: 0.5rem;
    max-width: 20ch;
    line-height: 1.4;
}

/* ───────────────────────────────
   Utility Classes
─────────────────────────────── */
.show {
    display: block;
}
.hide {
    display: none;
}

/* ───────────────────────────────
   Mobile / Small-Screen Adjustments
─────────────────────────────── */
@media (max-height: 600px), (max-width: 400px) {
    .menu-nav a {
        font-size: 1.3rem;
    }
    .menu-nav li {
        margin: 1rem 0;
    }
    .menu-desc {
        font-size: 1rem;
        max-width: 18ch;
    }
}

/* Menu Links - moderately smaller */
.menu-nav a {
    font-size: 1.6rem; /* was 2rem */
    line-height: 1.3; /* slightly tighter */
    font-weight: 600;
}

/* Menu Items - reduce vertical spacing */
.menu-nav li {
    margin: 1rem 0; /* was 1.5rem 0 */
}

/* Menu Descriptions - smaller but readable */
.menu-desc {
    font-size: 1rem; /* was 1.2rem */
    line-height: 1.3;
    margin-top: 0.15rem; /* was 0.2rem */
    margin-left: 0.4rem; /* slightly tighter */
    max-width: 20ch; /* keep wrapping reasonable */
}
