/* ============================================================
   System B – Default Theme Stylesheet
   A clean, WordPress-style theme layered on Bootstrap 5.
   ============================================================ */

:root {
    --accent:      #C4612F;
    --accent-dark: #A94E22;
    --ink:         #1F2421;
    --ink-soft:    #3F4A44;
    --muted:       #6B7280;
    --bg:          #FFFFFF;
    --bg-soft:     #F6F4F0;
    --border:      #E8E3DB;
    --radius:      16px;
    --shadow-sm:   0 1px 2px rgba(31,36,33,.05), 0 6px 18px rgba(31,36,33,.05);
    --shadow-md:   0 10px 34px rgba(31,36,33,.10);
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-dark); }

img { max-width: 100%; height: auto; }

/* ── Buttons (overrides Bootstrap) ─────────────────────────── */
.btn { border-radius: 999px; font-weight: 600; padding: .65rem 1.4rem; font-size: .95rem; }
.btn-primary { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover, .btn-primary:focus {
    background: var(--accent-dark); border-color: var(--accent-dark);
}
.btn-outline-primary { color: var(--accent); border-color: var(--accent); }
.btn-outline-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; border: none; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }

/* ── Header / Navigation ───────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.brand {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ink);
}
.brand:hover { color: var(--accent); }
.site-nav .nav-link {
    color: var(--ink-soft);
    font-weight: 500;
    margin: 0 .15rem;
    padding: .5rem .9rem !important;
    border-radius: 999px;
    position: relative;
    transition: color .15s ease, background .15s ease;
}
.site-nav .nav-link:hover { color: var(--accent); background: rgba(196,97,47,.08); }
.site-nav .nav-link.active { color: var(--accent); background: rgba(196,97,47,.10); }

/* ── Hero (homepage) ───────────────────────────────────────── */
.site-hero {
    background:
        radial-gradient(900px 420px at 12% -10%, rgba(196,97,47,.12), transparent 60%),
        radial-gradient(800px 400px at 95% 10%, rgba(31,36,33,.06), transparent 55%),
        var(--bg-soft);
    border-bottom: 1px solid var(--border);
    padding: 5.5rem 0 5rem;
}
.site-hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 700;
}
.site-hero .lead { color: var(--muted); font-size: 1.15rem; max-width: 640px; margin-inline: auto; }

/* ── Section headings ──────────────────────────────────────── */
.section-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}
.section-heading h2 { margin: 0; font-size: 1.6rem; }
.section-heading .heading-line { flex: 1; height: 1px; background: var(--border); }

/* ── Post cards ────────────────────────────────────────────── */
.post-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    height: 100%;
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(196,97,47,.4);
}
.post-card__media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-soft);
}
.post-card__media img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .4s ease;
}
.post-card:hover .post-card__media img { transform: scale(1.05); }
.post-card__media--empty {
    display: flex; align-items: center; justify-content: center;
    font-size: 2.4rem; color: #d5cfc6;
}
.post-card__body { padding: 1.4rem 1.5rem 1rem; display: flex; flex-direction: column; flex: 1; }
.post-card__title { font-size: 1.2rem; margin-bottom: .5rem; }
.post-card__title a { color: var(--ink); }
.post-card__title a:hover { color: var(--accent); }
.post-card__meta { color: var(--muted); font-size: .82rem; margin-bottom: .6rem; }
.post-card__excerpt { color: var(--ink-soft); font-size: .92rem; flex: 1; }
.post-card__footer { padding: .9rem 1.5rem 1.4rem; }

/* ── Pages list (homepage) ─────────────────────────────────── */
.page-list { list-style: none; padding: 0; margin: 0; }
.page-list li { border-bottom: 1px solid var(--border); }
.page-list li:last-child { border-bottom: 0; }
.page-list a {
    display: flex; align-items: center; justify-content: space-between;
    padding: .85rem .25rem; color: var(--ink-soft); font-weight: 500;
}
.page-list a::after { content: '→'; color: var(--accent); transition: transform .15s ease; }
.page-list a:hover { color: var(--accent); }
.page-list a:hover::after { transform: translateX(4px); }

/* ── Page / post headers ───────────────────────────────────── */
.page-header-hero {
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    padding: 3.2rem 0;
    margin-bottom: 2.5rem;
}
.page-header-hero h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0; }
.page-header-hero .crumb { color: var(--muted); font-size: .85rem; margin-bottom: .5rem; }
.blog-post__meta { color: var(--muted); font-size: .9rem; }
.blog-post__image { border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 1.75rem; width: 100%; }

/* ── Article typography ────────────────────────────────────── */
.page-content, .post-content { font-size: 1.05rem; color: var(--ink-soft); }
.page-content h2, .post-content h2 { font-size: 1.6rem; margin-top: 2rem; }
.page-content h3, .post-content h3 { font-size: 1.3rem; margin-top: 1.6rem; }
.page-content p, .post-content p { margin-bottom: 1.15rem; }
.page-content a, .post-content a { text-decoration: underline; text-underline-offset: 3px; }
.page-content img, .post-content img { border-radius: var(--radius); margin: 1.5rem 0; }
.page-content blockquote, .post-content blockquote {
    border-left: 4px solid var(--accent);
    background: var(--bg-soft);
    padding: 1.25rem 1.5rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    margin: 1.5rem 0;
}
.page-content ul, .post-content ul, .page-content ol, .post-content ol { margin-bottom: 1.15rem; padding-left: 1.4rem; }
.page-content table, .post-content table { width: 100%; margin: 1.5rem 0; border-collapse: collapse; }
.page-content th, .post-content th, .page-content td, .post-content td { border: 1px solid var(--border); padding: .6rem .8rem; }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: #C9CFC9; }
.site-footer h6 { color: #fff; font-family: var(--font-body); letter-spacing: .04em; }
.site-footer a { color: #C9CFC9; }
.site-footer a:hover { color: #fff; }
.site-footer .footer-link { display: block; padding: .2rem 0; }
.site-footer .brand { color: #fff; }
.site-footer-bottom { border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; color: #98A09A; }

/* ── Empty state ───────────────────────────────────────────── */
.empty-state { color: var(--muted); text-align: center; padding: 3rem 0; }

/* ── Admin toolbar (shown on the front when logged in) ─────── */
.admin-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 2000;
    background: var(--ink);
    color: #fff;
    font-size: .85rem;
}
.admin-bar__inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap;
    min-height: 40px; padding: .3rem 0;
}
.admin-bar__brand { font-weight: 600; }
.admin-bar__links { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.admin-bar__links a { color: #C9CFC9; }
.admin-bar__links a:hover { color: #fff; }
body:has(.admin-bar) { padding-top: 40px; }
body:has(.admin-bar) .site-header { top: 40px; }

/* ── Widgets ───────────────────────────────────────────────── */
.widget { margin-bottom: 1.5rem; }
.widget-title { font-size: 1.05rem; margin-bottom: .9rem; color: var(--ink); }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: .35rem 0; border-bottom: 1px solid var(--border); }
.widget ul li:last-child { border-bottom: 0; }
.widget ul li a { color: var(--ink-soft); }
.widget ul li a:hover { color: var(--accent); }
.widget-area .widget {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.4rem;
}
.site-footer .widget-area .widget { background: transparent; border: 0; padding: 0; }
.site-footer .widget-title { color: #fff; }
.site-footer .widget ul li { border-color: rgba(255,255,255,.1); }
.site-footer .widget ul li a { color: #C9CFC9; }
.site-footer .widget ul li a:hover { color: #fff; }
.tag-cloud .btn { margin: .25rem; }

/* ── Comments ──────────────────────────────────────────────── */
.comment__avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; flex-shrink: 0;
}

/* ── Brand logo ────────────────────────────────────────────── */
.brand__logo { height: 34px; width: auto; display: inline-block; vertical-align: middle; }

/* ── Hero with background image ────────────────────────────── */
.site-hero--image {
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
}
.site-hero--image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(31,36,33,.55);
}
.site-hero--image .container { position: relative; z-index: 1; }
.site-hero--image h1 { color: #fff; }
.site-hero--image .lead { color: rgba(255,255,255,.88); }

@media (max-width: 768px) {
    .site-hero { padding: 3.5rem 0 3rem; }
    .page-header-hero { padding: 2.2rem 0; }
}
