/* common.css — C3 chrome for pages ported from njsr.org (2026-07-09) */
/* Link this BEFORE page-specific stylesheets */

:root {
    --bg: #0d1209;
    --bg-elevated: rgba(13, 18, 9, 0.92);
    --border: #1e2a18;
    --text: #e4e8dc;
    --text-dim: #7d8f73;
    --accent: #c89040;
    --accent-dim: #8a6020;
}

/* Nav bar */
.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.5rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
}

/* Offset nav-bar left content to clear the fixed hamburger toggle */
body.has-snav .nav-bar {
    padding-left: 3.25rem;
}

.nav-bar a {
    color: var(--accent-dim);
    text-decoration: none;
}

.nav-bar a:hover {
    color: var(--accent);
}

.nav-brand {
    color: var(--text-dim);
}

.nav-brand strong {
    color: var(--accent);
}

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-dim);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
}

footer p {
    margin: 0 0 0.4rem;
    font-size: 0.8rem;
    color: var(--text-dim);
}

footer p:last-child {
    margin-bottom: 0;
}

footer strong {
    color: var(--text);
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Sitemap breadcrumb */
footer .sitemap {
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    line-height: 1.8;
    word-spacing: 0.15em;
}

footer .sitemap a {
    color: var(--accent);
    text-decoration: none;
}

footer .sitemap a:hover {
    text-decoration: underline;
}

/* Footer sections */
footer .c3-mission {
    max-width: 600px;
    margin: 0.75rem auto;
    line-height: 1.5;
}

footer .donate {
    margin: 0.75rem 0;
}

footer .crisis-pretext {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin: 1rem 0 0.25rem;
}

footer .crisis {
    margin: 0 0 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 107, 107, 0.15);
    border-radius: 4px;
    display: inline-block;
}

footer .crisis a {
    color: #ff6b6b;
}

footer .copyright {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 1rem;
}

/* ═══════════════════════════════════════
   SIDEBAR NAVIGATION
   ═══════════════════════════════════════ */

.snav-toggle {
    position: fixed;
    top: 0.6rem;
    left: 0.6rem;
    z-index: 1100;
    background: var(--bg-elevated, rgba(17, 17, 17, 0.85));
    border: 1px solid var(--border, #2a2820);
    color: var(--text-dim, #888);
    width: 36px;
    height: 36px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.15s, border-color 0.15s;
    font-family: inherit;
}

.snav-toggle:hover {
    color: var(--accent, #d4c5a9);
    border-color: var(--accent-dim, #8a7d5a);
}

.snav-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

/* Scrim overlay */
.snav-scrim {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(0, 0, 0, 0.55);
}

.snav-scrim.open {
    display: block;
}

/* Sidebar panel */
.snav-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1300;
    width: 200px;
    background: var(--bg, #12120f);
    border-right: 1px solid var(--border, #2a2820);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.snav-panel.open {
    transform: translateX(0);
}

.snav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border, #2a2820);
}

.snav-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent, #d4c5a9);
    letter-spacing: 0.05em;
}

.snav-close {
    background: none;
    border: none;
    color: var(--text-dim, #888);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}

.snav-close:hover {
    color: var(--text, #e0e0e0);
}

.snav-section {
    padding: 0.75rem 0 0.25rem;
}

.snav-section-label {
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-dim, #888);
    padding: 0 1rem 0.35rem;
}

.snav-panel a {
    display: block;
    padding: 0.4rem 1rem;
    color: var(--text-dim, #888);
    text-decoration: none;
    font-size: 0.8rem;
    border-left: 3px solid transparent;
    transition: color 0.1s, border-color 0.1s, background 0.1s;
}

.snav-panel a:hover {
    color: var(--text, #e0e0e0);
    background: rgba(255, 255, 255, 0.03);
}

.snav-panel a.active {
    color: var(--accent, #d4c5a9);
    border-left-color: var(--accent, #d4c5a9);
    background: rgba(212, 197, 169, 0.06);
}

.snav-footer {
    margin-top: auto;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border, #2a2820);
}

@media (min-width: 768px) {
    .snav-panel {
        width: 240px;
    }
}

/* ── Accessibility (2026-07-09) ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

a:focus-visible, button:focus-visible {
    outline: 2px solid var(--accent, #c89040);
    outline-offset: 2px;
    border-radius: 2px;
}
