/* ============================================================
   Explorez — Mobile menu (Bricks Nav Nested overlay)
   Styled to match the search overlay: dark editorial panel,
   Fraunces italic links with red JetBrains-Mono index numbers.
   Scoped to the open state (.brx-open), so it only affects the
   mobile breakpoint where the Nav Nested toggles to an overlay.
   ============================================================ */

/* Full-screen panel */
.brxe-nav-nested.brx-open .hdr-nav-link.brx-nav-nested-items {
    background: #0e0e0e;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 0 !important; /* override Bricks' ID-level gap (64px) on the <ul> */
    padding: 96px 28px 56px;
    counter-reset: hm-menu;
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
}

/* Hairline dividers between entries */
.brxe-nav-nested.brx-open .hdr-nav-link .menu-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.brxe-nav-nested.brx-open .hdr-nav-link .menu-item:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* The link: large Fraunces italic with a red mono index */
.brxe-nav-nested.brx-open .hdr-nav-link .menu-item > a.brxe-text-link {
    display: flex;
    align-items: baseline;
    gap: 18px;
    padding: 22px 4px;
    /* !important: Bricks emits per-element ID CSS (#brxe-… > li > a) that
       otherwise wins on font-size + color via its ID specificity. */
    color: #fff !important;
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(30px, 9vw, 40px) !important;
    line-height: 1.05;
    letter-spacing: -1.2px;
    text-decoration: none;
    font-variation-settings: 'SOFT' 0, 'WONK' 1;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

/* Index number: 01, 02, 03 … */
.brxe-nav-nested.brx-open .hdr-nav-link .menu-item > a.brxe-text-link::before {
    counter-increment: hm-menu;
    content: counter(hm-menu, decimal-leading-zero);
    flex-shrink: 0;
    width: 26px;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
    font-style: normal;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1.5px;
    line-height: 1;
    color: #6b1419;
    transform: translateY(-0.45em);
}

/* Hover / touch feedback */
.brxe-nav-nested.brx-open .hdr-nav-link .menu-item > a.brxe-text-link:hover,
.brxe-nav-nested.brx-open .hdr-nav-link .menu-item > a.brxe-text-link:active {
    color: #d8a3a6 !important;
    padding-left: 12px;
}

/* Current page */
.brxe-nav-nested.brx-open .hdr-nav-link .menu-item.current-menu-item > a.brxe-text-link,
.brxe-nav-nested.brx-open .hdr-nav-link .menu-item.current_page_item > a.brxe-text-link {
    color: #fff;
}
.brxe-nav-nested.brx-open .hdr-nav-link .menu-item.current-menu-item > a.brxe-text-link::before,
.brxe-nav-nested.brx-open .hdr-nav-link .menu-item.current_page_item > a.brxe-text-link::before {
    color: #fff;
}

/* Close button = the toggle that lives INSIDE the menu items.
   Targeted by location (not by .brxa--boring) so it works regardless of the
   toggle's "hamburger animation" setting, which differs between the local and
   prod copies of the Bricks header template. */
.brxe-nav-nested.brx-open .hdr-nav-link .menu-item:last-child {
    border: 0;
}
.brxe-nav-nested.brx-open .brx-nav-nested-items .brxe-toggle {
    /* !important: Bricks emits ID-level positioning for this toggle */
    position: fixed !important;
    top: 18px !important;
    right: 18px !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 2;
    width: 40px !important;
    height: 40px !important;
    color: #fff;
}

/* Hide the native hamburger bars and draw a consistent white X instead,
   so the close icon looks identical whether or not the animation is enabled. */
.brxe-nav-nested.brx-open .brx-nav-nested-items .brxe-toggle .brxa-wrap {
    opacity: 0;
}
.brxe-nav-nested.brx-open .brx-nav-nested-items .brxe-toggle::before,
.brxe-nav-nested.brx-open .brx-nav-nested-items .brxe-toggle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
}
.brxe-nav-nested.brx-open .brx-nav-nested-items .brxe-toggle::before {
    transform: translate(-50%, -50%) rotate(45deg);
}
.brxe-nav-nested.brx-open .brx-nav-nested-items .brxe-toggle::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}
