/* =========================================================
   RECOVERY ROOFER — UNIFIED STYLESHEET
   One source of truth for nav, footer, crisis CTA, and base
   typography. Page-specific styles live in each page's <style>
   block.
   ========================================================= */

/* ---------- CSS VARIABLES ---------- */
:root {
    --blue: #00a2ff;
    --blue-hover: #0090e0;
    --blue-dim: rgba(0,162,255,0.12);
    --bg: #0a0a0a;
    --surface: #111111;
    --surface-2: #161616;
    --border: #1e1e1e;
    --border-soft: #222;
    --text: #e8e8e8;
    --text-soft: #bbb;
    --muted: #666;
    --muted-2: #444;
    --muted-3: #333;
    --danger: #c0392b;
}

/* ---------- RESET ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Barlow', 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ---------- SHARED NAV (sticky, used on every page) ---------- */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10,10,10,0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.site-nav .nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}
.site-nav .nav-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 58px;
    gap: 20px;
}
.site-nav .nav-logo {
    height: 28px;
    width: auto;
    display: block;
}
.site-nav .nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.site-nav .nav-btn {
    color: #888;
    font-size: 0.78em;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 30px;
    transition: color 0.2s, background 0.2s;
}
.site-nav .nav-btn:hover {
    color: #fff;
    background: #1a1a1a;
}
.site-nav .nav-btn.active {
    color: #fff;
    background: var(--blue);
}

/* ---------- SHARED FOOTER ---------- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 28px 20px;
    text-align: center;
}
.site-footer p {
    color: var(--muted-2);
    font-size: 0.85em;
    margin: 0;
}
.site-footer a {
    color: var(--muted);
    transition: color 0.2s;
}
.site-footer a:hover { color: var(--blue); }
.site-footer .dot {
    color: var(--blue);
    margin: 0 6px;
}

/* ---------- SHARED FLOATING CRISIS CTA ---------- */
.floating-cta {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--danger);
    color: #fff;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 0.9em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(192,57,43,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 200;
}
.floating-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(192,57,43,0.5);
}
/* ---------- SHARED NEXT-PART / SERIES LINK BUTTON ---------- */

.next-part-link {
    display: inline-block;
    margin-top: 14px;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
    font-size: 0.9em;
    letter-spacing: 0.02em;
    padding: 10px 22px;
    border-radius: 30px;
    transition: background 0.2s;
}
.next-part-link:hover {
    background: var(--blue-hover);
}

/* ---------- PAGE CONTAINER HELPERS ---------- */
.page-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 28px;
}
.page-wrap-wide {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ---------- SHARED SECTION LABEL / EYEBROW ---------- */
.section-label {
    display: block;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 16px;
}

/* ---------- SHARED SECTION RULE ---------- */
.section-rule {
    max-width: 820px;
    margin: 0 auto 50px;
    padding: 0 28px;
}
.section-rule hr {
    border: none;
    border-top: 1px solid var(--border);
}

/* ---------- SHARED TYPOGRAPHY FOR ARTICLES ---------- */
.prose h1,
.prose h2,
.prose h3 {
    font-family: 'Barlow Condensed', 'Arial Black', sans-serif;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}
.prose h1 {
    font-size: clamp(2em, 5vw, 3em);
    margin-bottom: 24px;
}
.prose h2 {
    font-size: 1.7em;
    margin: 48px 0 18px;
}
.prose h3 {
    font-size: 1.25em;
    margin: 36px 0 14px;
}
.prose p {
    color: var(--text-soft);
    font-size: 1.02em;
    line-height: 1.8;
    margin-bottom: 20px;
}
.prose a {
    color: var(--blue);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}
.prose a:hover { border-bottom-color: var(--blue); }
.prose blockquote {
    border-left: 3px solid var(--blue);
    padding: 4px 0 4px 20px;
    margin: 24px 0;
    color: var(--text);
    font-style: italic;
}
.prose ul,
.prose ol {
    color: var(--text-soft);
    padding-left: 22px;
    margin-bottom: 20px;
    line-height: 1.8;
}
.prose li { margin-bottom: 6px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
    .site-nav .nav-btn {
        font-size: 0.7em;
        padding: 5px 10px;
    }
    .site-nav .nav-top {
        height: auto;
        padding: 12px 0;
    }
    .page-wrap,
    .page-wrap-wide,
    .section-rule {
        padding-left: 20px;
        padding-right: 20px;
    }
    .floating-cta {
        bottom: 16px;
        right: 16px;
        padding: 10px 16px;
        font-size: 0.82em;
    }
}
/* ---------- INLINE NAV "NEED HELP" BUTTON ---------- */
.site-nav .nav-help {
    margin-left: 8px;
    background: var(--danger);
    color: #fff !important;
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 7px 14px;
    border-radius: 30px;
    transition: background 0.2s, transform 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.site-nav .nav-help:hover {
    background: #d84838;
    transform: translateY(-1px);
}
.site-nav .nav-help::before {
    content: "●";
    color: #ffb3b3;
    font-size: 0.8em;
    animation: navPulse 2s infinite;
}
@keyframes navPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.3; }
}

/* On mobile: shrink inline button and hide the floating bubble */
@media (max-width: 720px) {
    .site-nav .nav-help {
        padding: 6px 10px;
        font-size: 0.7em;
    }
    .site-nav .nav-help::before { display: none; }
    .floating-cta { display: none; }
}
/* ---------- UPGRADED RICH FOOTER ---------- */
.site-footer-rich {
    border-top: 1px solid var(--border);
    padding: 48px 24px 28px;
    margin-top: 60px;
}
.site-footer-rich .footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--border);
}
.site-footer-rich h4 {
    font-family: 'Arial Black', sans-serif;
    font-size: 0.75em;
    color: var(--blue);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.site-footer-rich .footer-about p {
    color: var(--muted);
    font-size: 0.88em;
    line-height: 1.7;
    max-width: 340px;
}
.site-footer-rich ul {
    list-style: none;
    padding: 0;
}
.site-footer-rich li { margin-bottom: 8px; }
.site-footer-rich a {
    color: var(--text-soft);
    font-size: 0.88em;
    transition: color 0.2s;
}
.site-footer-rich a:hover { color: var(--blue); }
.site-footer-rich .footer-bottom {
    max-width: 1100px;
    margin: 20px auto 0;
    text-align: center;
    color: var(--muted-2);
    font-size: 0.8em;
}
.site-footer-rich .footer-bottom .dot {
    color: var(--blue);
    margin: 0 6px;
}
@media (max-width: 720px) {
    .site-footer-rich .footer-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}