/* ==========================================================================
   Foxy Studios: shared mobile menu (9 Nov 2026)
   One design for every page. Loaded last on each page so it wins over the
   per-page nav styles. Desktop is untouched: everything sits in a phone query.
   ========================================================================== */

.foxy-menu-foot { display: none; }

@media (max-width: 768px) {

    /* Keep the bar (logo + close button) above the open sheet */
    html body .nav .nav-logo,
    html body .nav .nav-hamburger,
    html body .nav .nav-cta { position: relative; z-index: 3; }

    /* Pages whose nav scrolls with the page: pin it while the menu is open */
    html body .nav:has(.nav-links.active) { position: fixed !important; top: 0; left: 0; right: 0; z-index: 10000 !important; }

    /* The sheet */
    html body .nav .nav-links.active {
        position: fixed !important;
        inset: auto !important;
        top: var(--foxy-nav-h, 80px) !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
        width: 100% !important; min-width: 0 !important; max-width: none !important;
        height: auto !important; max-height: none !important;
        margin: 0 !important;
        z-index: 2 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 0 !important;
        padding: 1.1rem 28px calc(1.75rem + env(safe-area-inset-bottom)) !important;
        background: #ffffff !important;
        border: 0 !important;
        border-top: 1px solid rgba(13, 17, 41, 0.08) !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Links: large editorial serif, left aligned, hairline rules */
    html body .nav .nav-links.active > a,
    html body .nav .nav-links.active .nav-link {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0.7rem 0 !important;
        border: 0 !important;
        border-bottom: 1px solid rgba(13, 17, 41, 0.08) !important;
        border-radius: 0 !important;
        background: transparent !important;
        font-family: 'Playfair Display', Georgia, serif !important;
        font-style: italic !important;
        font-weight: 500 !important;
        font-size: 1.85rem !important;
        line-height: 1.15 !important;
        letter-spacing: 0 !important;
        text-transform: none !important;
        text-align: left !important;
        color: #0d1129 !important;
        text-decoration: none !important;
        white-space: nowrap !important;
        box-shadow: none !important;
    }
    html body .nav .nav-links.active > a::before,
    html body .nav .nav-links.active .nav-link::before { content: none !important; display: none !important; }

    /* Small arrow on the right of each row */
    html body .nav .nav-links.active .nav-link::after {
        content: "" !important;
        display: block !important;
        position: static !important;
        width: 9px !important; height: 9px !important;
        margin: 0 4px 0 0 !important;
        background: none !important;
        border: 0 !important;
        border-top: 1.5px solid rgba(13, 17, 41, 0.35) !important;
        border-right: 1.5px solid rgba(13, 17, 41, 0.35) !important;
        transform: rotate(45deg) !important;
        opacity: 1 !important;
        flex: 0 0 auto;
    }

    /* Current page */
    html body .nav .nav-links.active .nav-link.active,
    html body .nav .nav-links.active .nav-link[aria-current="page"] { color: #8a95a3 !important; }
    html body .nav .nav-links.active .nav-link.active::after { border-color: #8a95a3 !important; }

    html body .nav .nav-links.active .nav-link:active { color: #4a6fa5 !important; }

    /* Footer of the sheet: call to action + contact */
    html body .nav .nav-links.active .foxy-menu-foot {
        display: block;
        margin-top: auto;
        padding-top: 1.75rem;
    }
    html body .nav .nav-links.active .foxy-menu-foot a.foxy-menu-cta {
        display: flex !important;
        align-items: center !important; justify-content: center !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 1.05rem 1.25rem !important;
        border: 0 !important;
        border-radius: 100px !important;
        background: #0d1129 !important;
        color: #ffffff !important;
        font-family: 'Inter', -apple-system, sans-serif !important;
        font-style: normal !important;
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        letter-spacing: 0.14em !important;
        text-transform: uppercase !important;
        text-decoration: none !important;
        box-shadow: 0 8px 22px rgba(13, 17, 41, 0.18) !important;
    }
    html body .nav .nav-links.active .foxy-menu-foot a.foxy-menu-cta::after,
    html body .nav .nav-links.active .foxy-menu-foot a.foxy-menu-cta::before,
    html body .nav .nav-links.active .foxy-menu-meta a::after,
    html body .nav .nav-links.active .foxy-menu-meta a::before { content: none !important; display: none !important; }
    html body .nav .nav-links.active .foxy-menu-foot .foxy-menu-meta {
        display: flex !important; flex-direction: row !important; flex-wrap: wrap !important;
        justify-content: center !important; align-items: center !important;
        gap: 0.25rem 1.6rem !important;
        margin-top: 1.1rem !important;
    }
    html body .nav .nav-links.active .foxy-menu-foot .foxy-menu-meta a {
        display: inline-block !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0.45rem 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: none !important;
        font-family: 'Inter', -apple-system, sans-serif !important;
        font-style: normal !important;
        font-size: 0.85rem !important;
        font-weight: 500 !important;
        line-height: 1.3 !important;
        letter-spacing: 0 !important;
        text-transform: none !important;
        color: #536471 !important;
        text-decoration: none !important;
    }

    /* Floating WhatsApp button would sit on the sheet: hide it while the menu is open */
    body:has(.nav .nav-links.active) #foxy-wa { display: none !important; }

    /* One entrance: rows rise in, one after another */
    html body .nav .nav-links.active > * { animation: foxyMenuIn 0.42s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
    html body .nav .nav-links.active > *:nth-child(1) { animation-delay: 0.02s; }
    html body .nav .nav-links.active > *:nth-child(2) { animation-delay: 0.05s; }
    html body .nav .nav-links.active > *:nth-child(3) { animation-delay: 0.08s; }
    html body .nav .nav-links.active > *:nth-child(4) { animation-delay: 0.11s; }
    html body .nav .nav-links.active > *:nth-child(5) { animation-delay: 0.14s; }
    html body .nav .nav-links.active > *:nth-child(6) { animation-delay: 0.17s; }
    html body .nav .nav-links.active > *:nth-child(7) { animation-delay: 0.20s; }
    html body .nav .nav-links.active > *:nth-child(8) { animation-delay: 0.23s; }
    html body .nav .nav-links.active > *:nth-child(9) { animation-delay: 0.26s; }
    html body .nav .nav-links.active > *:nth-child(n+10) { animation-delay: 0.29s; }
}

@keyframes foxyMenuIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 768px) and (max-height: 760px) {
    html body .nav .nav-links.active > a,
    html body .nav .nav-links.active .nav-link { font-size: 1.45rem !important; padding: 0.42rem 0 !important; }
    html body .nav .nav-links.active { padding-top: 0.6rem !important; }
    html body .nav .nav-links.active .foxy-menu-foot { padding-top: 1rem !important; }
    html body .nav .nav-links.active .foxy-menu-foot a.foxy-menu-cta { padding: 0.85rem 1.25rem !important; }
    html body .nav .nav-links.active .foxy-menu-foot .foxy-menu-meta { margin-top: 0.5rem !important; }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
    html body .nav .nav-links.active > * { animation: none !important; }
}
