/* =========================================================================
   APP FEEL (Dec 2026)

   How the site moves: pages cross-fade into one another, the menu opens
   softly, phones get a black bar of gold quick links along the bottom, and
   things you press answer the press.

   Everything here sits under html.jmb-app, a class the theme adds from
   library/app.php. Take that class away and none of this applies.

   Colours are the site's own: black, the gold of the menu words (#E0CE9A)
   and the brighter gold of the buttons (#F7B319). Fonts: Antique Ancienne
   for the menu words, futura-pt (Typekit) for the small words under the
   icons.
   ========================================================================= */


/* ---- 1. Pages cross-fade into one another ------------------------------ */

@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.22s;
    animation-timing-function: ease;
}

@media (prefers-reduced-motion: reduce) {
    @view-transition {
        navigation: none;
    }
}


/* ---- 2. A thin line across the top while the next page is on its way --- */

.jmb-progress {
    position: fixed;
    z-index: 2147482000;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.jmb-progress::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background: #E0CE9A;
    transform: scaleX(0);
    transform-origin: 0 50%;
}

.jmb-progress.is-on {
    opacity: 1;
}

.jmb-progress.is-on::before {
    transform: scaleX(0.86);
    transition: transform 9s cubic-bezier(0.05, 0.75, 0.1, 1);
}


/* ---- 3. Things you press answer the press ------------------------------ */

.jmb-app a,
.jmb-app button {
    -webkit-tap-highlight-color: transparent;
}

.jmb-app .hamburger,
.jmb-app .jmb-tab {
    touch-action: manipulation;
}


/* ---- 4. The menu opens softly, the page behind stays put --------------- */

@keyframes jmb-menu-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes jmb-menu-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes jmb-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

html.jmb-menu-open,
html.jmb-menu-open body {
    overflow: hidden;
}

/* The theme's menu is #top_nav: a fixed sheet the hamburger shows and hides
   (header.php + footer.php). Drawn properly here: solid black, the words
   large and centred in the site's own serif, room for the bar below. */
.jmb-app #top_nav {
    display: none;
    z-index: 8990 !important;
    background: #000 !important;
    padding: calc(12vh + env(safe-area-inset-top, 0px)) 24px calc(100px + env(safe-area-inset-bottom, 0px)) !important;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    animation: jmb-menu-in 0.22s ease both;
}

.jmb-app.jmb-menu-closing #top_nav {
    animation: jmb-menu-out 0.17s ease both;
}

/* the blank lines the template prints at the top of the sheet */
.jmb-app #top_nav > br {
    display: none;
}

.jmb-app #top_nav ul {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 12vh - 100px);
    min-height: calc(100dvh - 12vh - 100px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    margin: 0 !important;
    padding: 0;
    list-style: none;
}

.jmb-app #top_nav li {
    display: block;
    float: none;
    width: auto;
    margin: 0;
    padding: 0.2em 0 !important;
    animation: jmb-rise 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.jmb-app #top_nav li:nth-child(1) { animation-delay: 0.04s; }
.jmb-app #top_nav li:nth-child(2) { animation-delay: 0.07s; }
.jmb-app #top_nav li:nth-child(3) { animation-delay: 0.10s; }
.jmb-app #top_nav li:nth-child(4) { animation-delay: 0.13s; }
.jmb-app #top_nav li:nth-child(5) { animation-delay: 0.16s; }
.jmb-app #top_nav li:nth-child(6) { animation-delay: 0.19s; }
.jmb-app #top_nav li:nth-child(7) { animation-delay: 0.22s; }
.jmb-app #top_nav li:nth-child(n+8) { animation-delay: 0.25s; }

.jmb-app #top_nav li a {
    display: inline-block;
    padding: 0.1em 0.4em;
    color: #E0CE9A !important;
    font-family: "Antique Ancienne", "futura-pt", Georgia, serif;
    font-weight: 400;
    font-size: 44px;
    line-height: 1.15;
    letter-spacing: 0.01em;
    text-transform: lowercase !important;
    text-decoration: none;
    border: 0;
    transition: opacity 0.2s ease;
}

.jmb-app #top_nav li a:active {
    opacity: 0.6;
}

/* the page you are on, in the brighter gold of the site's buttons */
.jmb-app #top_nav .current-menu-item > a,
.jmb-app #top_nav .current_page_item > a {
    color: #F7B319 !important;
}

@media (prefers-reduced-motion: reduce) {
    .jmb-app #top_nav,
    .jmb-app #top_nav li {
        animation: none !important;
    }
}


/* ---- 5. Phones: a bar of quick links along the bottom ------------------ */

.jmb-tabbar {
    display: none;
}

@media (max-width: 767px) {

    .jmb-tabbar {
        position: fixed;
        z-index: 9000;
        right: 0;
        bottom: 0;
        left: 0;
        display: flex;
        align-items: stretch;
        justify-content: space-around;
        margin: 0;
        padding: 0 4px env(safe-area-inset-bottom, 0px);
        background: rgba(0, 0, 0, 0.92);
        -webkit-backdrop-filter: saturate(120%) blur(16px);
        backdrop-filter: saturate(120%) blur(16px);
        box-shadow: 0 -1px 0 rgba(224, 206, 154, 0.22);
        transition: transform 0.25s ease;
    }

    .jmb-tabbar .jmb-tab {
        position: relative;
        display: flex;
        flex: 1 1 0;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        min-width: 0;
        height: 58px;
        margin: 0;
        padding: 0;
        background: none;
        color: #E0CE9A !important;
        opacity: 0.7;
        border: 0 !important;
        border-radius: 0;
        font-family: "futura-pt", "Helvetica Neue", Helvetica, Arial, sans-serif;
        font-size: 11.5px;
        font-weight: 500;
        line-height: 1;
        letter-spacing: 0.1em;
        text-decoration: none !important;
        text-transform: lowercase;
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
        transition: opacity 0.2s ease, transform 0.16s ease;
    }

    .jmb-tabbar .jmb-tab:hover,
    .jmb-tabbar .jmb-tab:focus {
        color: #E0CE9A !important;
        background: none;
    }

    .jmb-tabbar .jmb-tab:active {
        transform: scale(0.92);
    }

    .jmb-tabbar .jmb-tab svg {
        display: block;
        width: 24px;
        height: 24px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .jmb-tabbar .jmb-tab-label {
        max-width: 100%;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .jmb-tabbar .jmb-tab.is-on,
    .jmb-tabbar .jmb-tab[aria-expanded="true"] {
        opacity: 1;
    }

    /* which page you are on: a small dot above the icon */
    .jmb-tabbar .jmb-tab.is-on::before {
        content: "";
        position: absolute;
        top: 5px;
        left: 50%;
        width: 4px;
        height: 4px;
        margin-left: -2px;
        background: #F7B319;
        border-radius: 50%;
    }

    /* menu: the three lines turn into a cross while the menu is open */
    .jmb-tabbar .jmb-tab--menu svg path {
        transform-box: fill-box;
        transform-origin: 50% 50%;
        transition: transform 0.25s ease, opacity 0.2s ease;
    }

    .jmb-tabbar .jmb-tab--menu[aria-expanded="true"] svg path:nth-child(1) { transform: translateY(5px) rotate(45deg); }
    .jmb-tabbar .jmb-tab--menu[aria-expanded="true"] svg path:nth-child(2) { opacity: 0; }
    .jmb-tabbar .jmb-tab--menu[aria-expanded="true"] svg path:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

    /* out of the way of the keyboard while something is being typed */
    html.jmb-typing .jmb-tabbar {
        transform: translateY(110%);
    }

    /* the bar has the menu button now, so the floating one in the corner goes */
    body.jmb-has-tabbar #expand_menu {
        display: none;
    }

    /* room for the bar under the footer */
    body.jmb-has-tabbar {
        padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
    }
}


/* ---- 6. Release pages: the cover sits inside the card, not edge to edge ---- */

@media (max-width: 520px) {

    .lmeg-drop {
        margin-left: 16px !important;
        margin-right: 16px !important;
    }
}
