/* ============================================================
   NAVIGATION PREVIEW (2026-10-19) — loaded after shell.css, only with html.pv-nav (?preview=nav).
   Phone:   bottom bar = Menu · Theme · Prev · Next (same bar, same glass + light pulse)
            top bar = language · theme · menu (fa-bars)
            scroll cue above the bar on pages without their own hero chevron
   Desktop: theme button next to the menu button, menu icon = fa-bars
   Phone + desktop: slim fold-out menu from the right (bunkros.com proportions, deijs palette + type)
   iPad (768–1199px) is not touched: no rule here applies in that range, and the iPad rail keeps the grid drawer.
   ============================================================ */

/* ---------- phone: top bar + bottom bar ---------- */
@media (max-width: 767px) {
    html.pv-nav #navToggle { display: grid; }
    html.pv-nav .tabbar { grid-template-columns: repeat(4, 1fr); }
    html.pv-nav .tabbar .tabbar-ind { display: none; }
    html.pv-nav .tabbar .tab:disabled { opacity: .35; pointer-events: none; }
    html.pv-nav .tabbar .theme-ico { width: 1.15rem; height: 1.15rem; font-size: 1.15rem; }
    html.pv-nav .tabbar .theme-ico i { transition: transform .6s var(--sh-spring), opacity .35s; }
}

/* ---------- desktop: theme button beside the menu button ---------- */
@media (min-width: 1200px) {
    html.pv-nav .topbar #mobileThemeBtn { display: grid !important; }
}

/* ---------- phone: scroll cue (same idea as the hero chevron on bunkros.com) ---------- */
.scroll-cue { display: none; }
@media (max-width: 767px) {
    html.pv-nav .scroll-cue:not([hidden]) {
        position: fixed; z-index: 980; left: 50%; bottom: calc(var(--sh-bot-h) + 6px);
        width: 48px; height: 48px; padding: 0; display: grid; place-items: center; cursor: pointer;
        border-radius: 50%; border: 1px solid var(--sh-accent);
        background: rgba(var(--sh-accent-rgb), .1); color: var(--sh-accent); font-size: 1rem;
        -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
        opacity: 0; transform: translateX(-50%);
        animation: snCueIn 1s 1.2s forwards, snCueBounce 2s 2.2s infinite;
    }
    html.pv-nav body.menu-open .scroll-cue { visibility: hidden; }
}
@keyframes snCueIn { to { opacity: 1; } }
@keyframes snCueBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ---------- slim menu ---------- */
.slimnav { display: none; }
@media (max-width: 767px), (min-width: 1200px) {
    html.pv-nav .slimnav {
        position: fixed; z-index: 2000;
        top: calc(12px + var(--sh-safe-t, 0px)); right: 12px; bottom: calc(12px + var(--sh-safe-b, 0px)); left: auto;
        width: min(300px, calc(100vw - 24px)); margin: 0; padding: 16px 12px 12px;
        display: flex; flex-direction: column;
        border-radius: 22px; border: 1px solid var(--sh-border);
        background: var(--sh-glass-strong);
        -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
        box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .75);
        color: var(--sh-text); font: 500 .92rem/1.35 var(--font-heading, Montserrat, sans-serif);
        -webkit-font-smoothing: antialiased;
        visibility: hidden; overflow: hidden;
        transform: translateX(calc(100% + 28px));
        transition: transform .45s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .45s;
    }
    html.pv-nav .slimnav.active { visibility: visible; transform: none; transition: transform .45s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
}
@media (max-width: 767px) {
    html.pv-nav .slimnav { width: min(320px, calc(100vw - 20px)); right: 10px; top: calc(10px + var(--sh-safe-t, 0px)); bottom: calc(10px + var(--sh-safe-b, 0px)); }
}
[data-theme="light"] .slimnav { box-shadow: 0 40px 90px -34px rgba(61, 68, 60, .35); }

/* head */
.sn-head { display: flex; align-items: center; justify-content: space-between; padding: 0 0 6px 6px; flex: none; }
.sn-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.slimnav .sn-mark { width: 30px; height: 30px; }
.slimnav .sn-word { display: inline; font-size: .82rem; letter-spacing: .18em; }
.sn-x {
    width: 44px; height: 44px; border: 0; border-radius: 12px; display: grid; place-items: center;
    background: none; color: var(--sh-muted); cursor: pointer; font-size: 1.05rem;
    transition: background-color .15s, color .15s;
}
.sn-x:hover { background: var(--sh-surface-2); color: var(--sh-text); }

/* body */
.sn-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; margin: 0 -4px; padding: 0 4px; scrollbar-width: none; }
.sn-body::-webkit-scrollbar { display: none; }
.sn-group + .sn-group { border-top: 1px solid var(--sh-border); margin-top: 10px; }
.sn-lbl {
    padding: 0 12px; margin: 16px 0 6px;
    font: 700 .7rem/1 var(--font-heading, Montserrat, sans-serif); letter-spacing: .18em; text-transform: uppercase;
    color: var(--sh-accent);
}
.sn-group:first-child { padding-top: 4px; }

body .slimnav .sn-item {
    position: relative; display: flex; align-items: center; gap: 13px;
    min-height: 44px; padding: 0 12px; border-radius: 11px;
    color: var(--sh-muted); text-decoration: none; cursor: pointer;
    transition: background-color .15s, color .15s;
}
.slimnav .sn-i { width: 19px; flex: none; text-align: center; font-size: .95rem; opacity: .9; }
body .slimnav .sn-item:hover { background: var(--sh-surface-2); color: var(--sh-text); }
body .slimnav .sn-item[aria-current="page"] { background: var(--sh-tint); color: var(--sh-text); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(var(--sh-accent-rgb), .25); }
.slimnav .sn-item[aria-current="page"] .sn-i { color: var(--sh-accent); opacity: 1; }
.sn-t { flex: 1; white-space: nowrap; letter-spacing: .01em; }

/* foot: theme switch */
.sn-foot { flex: none; padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--sh-border); display: flex; flex-direction: column; gap: 8px; }
.sn-world { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border-radius: 12px; background: var(--sh-surface); box-shadow: inset 0 0 0 1px var(--sh-border); }
.sn-world button {
    display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 6px;
    border: 0; border-radius: 9px; background: none; cursor: pointer;
    font: 600 .72rem/1.1 var(--font-heading, Montserrat, sans-serif); letter-spacing: .04em; color: var(--sh-muted);
    transition: background-color .25s, color .25s, box-shadow .25s;
}
.sn-world button i { font-size: .8rem; }
.sn-world button[aria-pressed="true"] { background: var(--sh-tint); color: var(--sh-text); box-shadow: inset 0 0 0 1px rgba(var(--sh-accent-rgb), .35); }
.sn-world button[aria-pressed="true"] i { color: var(--sh-accent); }
body .slimnav .sn-out { color: #ff6b6b; }

/* entrance */
.slimnav .sn-group, .slimnav .sn-foot { opacity: 0; transform: translateX(10px); transition: opacity .3s, transform .4s cubic-bezier(.2, .8, .2, 1); }
.slimnav.active .sn-group, .slimnav.active .sn-foot { opacity: 1; transform: none; }
.slimnav.active .sn-group:nth-child(2) { transition-delay: .03s; }
.slimnav.active .sn-group:nth-child(3) { transition-delay: .06s; }
.slimnav.active .sn-group:nth-child(4) { transition-delay: .09s; }
.slimnav.active .sn-group:nth-child(5) { transition-delay: .12s; }
.slimnav.active .sn-group:nth-child(n+6), .slimnav.active .sn-foot { transition-delay: .15s; }

@media (prefers-reduced-motion: reduce) {
    .slimnav, .slimnav .sn-group, .slimnav .sn-foot { transition: none !important; }
    html.pv-nav .scroll-cue:not([hidden]) { animation: none !important; opacity: 1; }
}
@media print { .slimnav, .scroll-cue { display: none !important; } }
