/* ============================================================
   Site chrome: mobile drawer + footer grid.

   The navbar's hamburger used to toggle `.mobile-menu`, an element that
   was never in the DOM and had no styles — so mobile had no navigation
   at all. This file supplies both.
   ============================================================ */

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 200;
}
.mobile-menu[hidden] { display: none; }

.mobile-menu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.22s ease;
}
.mobile-menu.is-open .mobile-menu-backdrop { opacity: 1; }

.mobile-menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(86vw, 340px);
    background: var(--bg, #fff);
    border-left: 1px solid var(--border, #E2E8F0);
    box-shadow: -12px 0 40px rgba(15, 23, 42, 0.16);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.26s cubic-bezier(0.32, 0.72, 0, 1);
    overscroll-behavior: contain;
}
.mobile-menu.is-open .mobile-menu-panel { transform: translateX(0); }

.mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border, #E2E8F0);
    flex-shrink: 0;
}

.mobile-menu-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 8px calc(12px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    /* 48px min height keeps every row a comfortable thumb target */
    min-height: 48px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text, #0F172A);
    transition: background 0.15s;
}
.mobile-menu-link:hover,
.mobile-menu-link:focus-visible { background: var(--surface-2, #F1F5F9); }
.mobile-menu-link i,
.mobile-menu-link svg { color: var(--primary, #5B21B6); flex-shrink: 0; }

.mobile-menu-foot {
    display: grid;
    gap: 8px;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border, #E2E8F0);
    flex-shrink: 0;
}

/* Drawer is a mobile affordance only */
@media (min-width: 1024px) {
    .mobile-menu { display: none !important; }
}

body.has-drawer-open { overflow: hidden; }

/* ---- Footer ---- */
.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: var(--space-8, 32px);
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2, 8px);
}
.footer-links a { transition: color 0.15s; }
.footer-links a:hover { color: var(--primary, #5B21B6); }

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-6, 24px); }
    .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* Bottom nav overlaps page end on mobile — reserve room so the footer clears it */
@media (max-width: 1023px) {
    body { padding-bottom: 64px; }
}
