/* =============================================================================
   RunYourHOA — Standalone stylesheet
   Warm stone-scale neutrals with deep teal accent.
   No Bootstrap. No external dependencies.
   ============================================================================= */

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

:root {
    --accent: #c26e60;
    --accent-hover: #a85a4e;
    --accent-light: rgba(194, 110, 96, 0.08);
    --accent-border: rgba(194, 110, 96, 0.25);
    --text: #1a1a1a;
    --text-body: #333;
    --text-muted: #666;
    --text-faint: #999;
    --bg: #fff;
    --bg-warm: #f8f7f5;
    --bg-code: #f0efed;
    --border: #e5e3e0;
    --border-strong: #d4d1cc;
    --cta-bg: #1a1a1a;
    --cta-text: #fff;
    --radius: 6px;
    --max-width: 1080px;
    --narrow: 720px;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-body);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; height: auto; }

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: var(--narrow); margin: 0 auto; padding: 0 1.5rem; }

/* --- Header --- */
.site-header {
    border-bottom: 3px solid var(--accent);
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.site-logo {
    display: flex;
    align-items: center;
    color: var(--accent);
    transition: color 0.15s;
}
.site-logo:hover { color: var(--accent-hover); }

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active {
    color: var(--text);
    border-bottom-color: var(--accent);
}

/* --- Hero --- */
.hero {
    background: var(--bg-warm);
    border-bottom: 1px solid var(--border);
    padding: 5rem 1.5rem 4.5rem;
    text-align: center;
}

.hero-inner {
    max-width: 640px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.15;
    letter-spacing: -0.025em;
    margin-bottom: 1.25rem;
}

.hero-accent {
    display: inline;
    background-image: linear-gradient(transparent 65%, rgba(15, 118, 110, 0.15) 65%);
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 520px;
    margin: 0 auto;
}

/* --- Section Heading --- */
.section-heading {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
}

/* --- Grid (sections) --- */
.sections-grid { padding: 3.5rem 0; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.card {
    display: block;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem 1.5rem 1.5rem;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    color: var(--text-body);
}
.card:hover {
    border-color: var(--accent-border);
    box-shadow: 0 6px 20px rgba(194, 110, 96, 0.12);
    transform: translateY(-2px);
    color: var(--text-body);
}

.card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.55;
}

.card-meta {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent);
    background: var(--accent-light);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}

/* --- Article List --- */
.recent-articles { padding: 3.5rem 0; background: var(--bg); border-top: 1px solid var(--border); }
.article-list-section { padding: 2rem 0 3rem; }

.article-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.article-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    color: var(--text-body);
}
.article-card:hover {
    transform: translateY(-1px);
    border-color: var(--accent-border);
    box-shadow: 0 4px 16px rgba(194, 110, 96, 0.1);
    color: var(--text-body);
}

.article-card-body { flex: 1; }

.article-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.3rem;
    transition: color 0.2s;
}
.article-card:hover h3 { color: var(--accent); }

.article-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.article-card-arrow {
    font-size: 1.1rem;
    color: var(--border-strong);
    margin-left: 1rem;
    transition: color 0.2s, transform 0.2s, opacity 0.2s;
    flex-shrink: 0;
    opacity: 0;
}
.article-card:hover .article-card-arrow {
    color: var(--accent);
    transform: translateX(4px);
    opacity: 1;
}

.article-section-label {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    background: var(--accent-light);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    margin-bottom: 0.4rem;
}

.article-meta, .article-meta-bar {
    font-size: 0.8rem;
    color: var(--text-faint);
    display: flex;
    gap: 1rem;
}

/* --- Section Header --- */
.section-header {
    padding: 2.5rem 0 1.5rem;
    border-bottom: 1px solid var(--border);
}

.section-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 600px;
}

/* --- Breadcrumb --- */
.breadcrumb {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.breadcrumb a { color: var(--text-faint); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { color: var(--border-strong); margin: 0 0.4rem; }
.breadcrumb .current { color: var(--text-muted); font-weight: 600; }

/* --- Article Detail --- */
.article-header {
    padding: 2.5rem 0 1.5rem;
    border-bottom: 1px solid var(--border);
}

.article-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.25;
    letter-spacing: -0.02em;
    max-width: var(--narrow);
}

.article-meta-bar {
    margin-top: 0.75rem;
}

/* --- Article Body (Rendered Markdown) --- */
.article-body {
    padding: 2.5rem 0 3rem;
}

.article-body h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin: 2.5rem 0 0.75rem;
    padding-top: 1rem;
    letter-spacing: -0.01em;
    border-top: 1px solid var(--border);
}

.article-body h2:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.article-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin: 1.75rem 0 0.5rem;
}

.article-body p {
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

.article-body ul, .article-body ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.article-body li::marker {
    color: var(--accent);
}

.article-body blockquote {
    border-left: 3px solid var(--accent);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--accent-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-body);
    font-style: italic;
}

.article-body code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    font-size: 0.9em;
    background: var(--bg-code);
    padding: 0.15em 0.4em;
    border-radius: 3px;
}

.article-body pre {
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.article-body pre code {
    background: none;
    padding: 0;
    font-size: 0.85rem;
    line-height: 1.5;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.article-body th {
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--text);
    padding: 0.5rem 0.75rem;
    background: var(--bg-warm);
}

.article-body td {
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
}

.article-body a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: var(--accent-border);
    text-underline-offset: 2px;
}
.article-body a:hover {
    text-decoration-color: var(--accent);
}

.article-body strong {
    color: var(--text);
    font-weight: 600;
}

/* --- CTA Banner --- */
.cta-banner {
    background: var(--cta-bg);
    color: var(--cta-text);
    padding: 3.5rem 1.5rem;
    text-align: center;
}

.cta-banner h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.cta-banner p {
    font-size: 0.95rem;
    color: #aaa;
    max-width: 560px;
    margin: 0 auto 1.5rem;
    line-height: 1.65;
}

.cta-link {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.65rem 1.75rem;
    border-radius: var(--radius);
    transition: background 0.15s;
}
.cta-link:hover {
    background: var(--accent-hover);
    color: #fff;
}

/* --- Article Nav (Prev/Next) --- */
.article-nav {
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
}

.article-nav .container {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.nav-prev, .nav-next {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-width: 45%;
    color: var(--text-body);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    transition: background 0.15s;
}
.nav-prev:hover, .nav-next:hover { background: var(--bg-warm); }
.nav-next { text-align: right; margin-left: auto; }

.nav-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint);
    font-weight: 600;
}

.nav-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}
.nav-prev:hover .nav-title,
.nav-next:hover .nav-title { color: var(--accent-hover); }

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-warm);
    padding: 3rem 0 2rem;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-nav {
    display: flex;
    gap: 4rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    margin-bottom: 0.75rem;
}

.footer-col a {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}
.footer-col a:hover { color: var(--text); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.footer-bottom a { color: var(--text); font-weight: 600; }
.footer-bottom a:hover { color: var(--text-body); }

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-faint);
}

/* --- Empty State --- */
.empty-state {
    color: var(--text-muted);
    font-style: italic;
    padding: 2rem 0;
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .hero { padding: 3rem 1.5rem 2.5rem; }
    .hero h1 { font-size: 1.85rem; }
    .hero-sub { font-size: 1rem; }

    .grid { grid-template-columns: 1fr; }

    .nav-links { gap: 1rem; }
    .nav-links a { font-size: 0.8rem; }

    .article-header h1 { font-size: 1.5rem; }
    .article-body p, .article-body li { font-size: 1rem; }

    .article-card { padding: 1rem 1.25rem; }
    .article-card-arrow { display: none; }

    .article-nav .container { flex-direction: column; gap: 1rem; }
    .nav-prev, .nav-next { max-width: 100%; text-align: left; }

    .footer-nav { flex-direction: column; gap: 1.5rem; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
}
