/* ─── Variables ─────────────────────────────────────────── */
:root {
    --bg:          #f8f5f0;
    --bg-card:     #ffffff;
    --bg-mid:      #ede9e3;
    --text:        #1a1a2e;
    --text-mid:    #374151;
    --text-muted:  #6b7280;
    --gold:        #c9a84c;
    --gold-hover:  #b8943d;
    --navy:        #1C2547;
    --border:      #e2ddd6;
    --font-serif:  'Spectral', Georgia, serif;
    --font-sans:   'Source Sans 3', system-ui, sans-serif;
    --radius:      4px;
    --max-w:       800px;
    --max-w-wide:  1080px;
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font-sans); line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ─── Layout ─────────────────────────────────────────────── */
.container      { max-width: var(--max-w-wide); margin: 0 auto; padding: 0 24px; }
.container-text { max-width: var(--max-w);      margin: 0 auto; padding: 0 24px; }

/* ─── Header ─────────────────────────────────────────────── */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(248,245,240,0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.site-header .container {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.site-logo {
    font-family: var(--font-serif);
    font-size: 1.1rem; font-weight: 600;
    color: var(--navy); letter-spacing: -0.01em;
    display: flex; align-items: center;
}
.site-logo span { color: var(--gold); }
.site-logo-img { height: 36px; width: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.site-nav ul li { margin: 0; padding: 0; }
.site-nav a, .site-nav ul li a {
    font-size: 0.9rem; font-weight: 400;
    color: var(--text-mid);
    transition: color 0.2s;
}
.site-nav a:hover, .site-nav ul li a:hover { color: var(--navy); }
.btn-subscribe {
    background: var(--gold); color: var(--navy) !important;
    font-weight: 600; font-size: 0.85rem;
    padding: 8px 18px; border-radius: 2px;
    transition: background 0.2s;
    cursor: pointer;
}
.btn-subscribe:hover { background: var(--gold-hover) !important; }

/* ─── Homepage Hero ──────────────────────────────────────── */
.site-hero {
    padding: 72px 0 56px;
    border-bottom: 1px solid var(--border);
}
.site-hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700; line-height: 1.2;
    color: var(--navy); margin-bottom: 16px;
}
.site-hero p {
    font-size: 1.1rem; color: var(--text-mid);
    max-width: 520px; line-height: 1.7;
}

/* ─── Post List ──────────────────────────────────────────── */
.post-list { padding: 56px 0; }
.post-list-header {
    font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--text-muted); margin-bottom: 32px;
}
.post-feed { display: flex; flex-direction: column; gap: 0; }

/* ─── Post Card ──────────────────────────────────────────── */
.post-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    padding: 32px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: opacity 0.15s;
}
.post-card:first-child { padding-top: 0; }
.post-card:hover .post-card-title { color: var(--gold); }
.post-card-tag {
    font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--gold); margin-bottom: 8px;
    display: block;
}
.post-card-title {
    font-family: var(--font-serif);
    font-size: 1.35rem; font-weight: 700;
    line-height: 1.3; color: var(--navy);
    margin-bottom: 10px;
    transition: color 0.2s;
}
.post-card-excerpt {
    font-size: 0.95rem; color: var(--text-mid);
    line-height: 1.65; margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card-meta {
    display: flex; align-items: center; gap: 10px;
    font-size: 0.82rem; color: var(--text-muted);
}
.post-card-meta-dot { opacity: 0.4; }
.post-card-image {
    width: 120px; height: 90px;
    object-fit: cover; border-radius: var(--radius);
    flex-shrink: 0; align-self: center;
}
.post-card-image-placeholder {
    width: 120px; height: 90px;
    background: var(--bg-mid);
    border-radius: var(--radius);
    align-self: center;
}

/* ─── Pagination ─────────────────────────────────────────── */
.pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 16px; padding: 48px 0;
}
.pagination a, .pagination span {
    font-size: 0.9rem; color: var(--text-muted);
    padding: 8px 16px; border: 1px solid var(--border);
    border-radius: var(--radius);
}
.pagination a:hover { border-color: var(--gold); color: var(--gold); }
.pagination .page-number { border: none; font-weight: 600; color: var(--text-mid); }

/* ─── Single Post ────────────────────────────────────────── */
.post-header { padding: 56px 0 40px; }
.post-primary-tag {
    font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--gold); margin-bottom: 16px;
    display: block;
}
.post-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 700; line-height: 1.15;
    color: var(--navy); margin-bottom: 20px;
}
.post-excerpt {
    font-size: 1.15rem; line-height: 1.7;
    color: var(--text-mid); margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
    font-style: italic;
}
.post-byline {
    display: flex; align-items: center; gap: 12px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}
.post-author-avatar {
    width: 44px; height: 44px;
    border-radius: 50%; object-fit: cover;
    border: 2px solid var(--bg-mid);
    flex-shrink: 0;
}
.post-author-avatar-placeholder {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--navy);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold); font-weight: 700; font-size: 1rem;
    flex-shrink: 0;
}
.post-byline-meta { font-size: 0.85rem; }
.post-author-name { font-weight: 600; color: var(--navy); display: block; }
.post-byline-details { color: var(--text-muted); font-size: 0.85rem; align-self: center; }

/* ─── Featured Image ─────────────────────────────────────── */
.post-featured-image {
    width: 100%; max-width: var(--max-w);
    margin: 0 auto 40px;
    border-radius: var(--radius);
    overflow: hidden;
}
.post-featured-image img { width: 100%; }

/* ─── Post Content ───────────────────────────────────────── */
.post-content { padding: 40px 0 56px; }
.gh-content { color: var(--text-mid); line-height: 1.85; }
.gh-content h2 {
    font-family: var(--font-serif);
    font-size: 1.7rem; font-weight: 700;
    color: var(--navy); margin: 64px 0 20px;
    line-height: 1.25;
}
.gh-content h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem; font-weight: 600;
    color: var(--navy); margin: 44px 0 14px;
}
.gh-content h4 {
    font-size: 1rem; font-weight: 600;
    color: var(--text); margin: 28px 0 8px;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.gh-content p { margin-bottom: 24px; }
.gh-content a { color: var(--gold); border-bottom: 1px solid rgba(201,168,76,0.3); transition: border-color 0.2s; }
.gh-content a:hover { border-color: var(--gold); }
.gh-content ul, .gh-content ol { margin: 0 0 24px 24px; }
.gh-content li { margin-bottom: 8px; }
.gh-content blockquote {
    border-left: 3px solid var(--gold);
    padding: 4px 0 4px 24px;
    margin: 32px 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--text);
}
.gh-content code {
    font-family: 'Courier New', monospace;
    font-size: 0.88em;
    background: var(--bg-mid);
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--navy);
}
.gh-content pre {
    background: var(--navy);
    color: #e2ddd6;
    padding: 24px;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 32px 0;
}
.gh-content pre code {
    background: none; padding: 0;
    color: inherit; font-size: 0.9rem;
}
.gh-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 48px 0;
}
.gh-content img {
    border-radius: var(--radius);
    margin: 32px auto;
}
.gh-content figure { margin: 32px 0; }
.gh-content figcaption {
    text-align: center;
    font-size: 0.82rem; color: var(--text-muted);
    margin-top: 8px;
}
.gh-content table { width: 100%; border-collapse: collapse; margin: 32px 0; font-size: 0.95rem; }
.gh-content th {
    background: var(--navy); color: var(--bg);
    padding: 12px 16px; text-align: left; font-weight: 600;
}
.gh-content td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.gh-content tr:nth-child(even) td { background: var(--bg-mid); }

/* ─── Post Tags ──────────────────────────────────────────── */
.post-tags {
    display: flex; flex-wrap: wrap; gap: 8px;
    padding: 32px 0;
    border-top: 1px solid var(--border);
}
.post-tag {
    font-size: 0.8rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-muted);
    background: var(--bg-mid);
    padding: 4px 12px; border-radius: 2px;
    transition: color 0.2s;
}
.post-tag:hover { color: var(--gold); }

/* ─── Author Bio ─────────────────────────────────────────── */
.author-bio {
    display: flex; gap: 24px; align-items: flex-start;
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 48px 0;
}
.author-bio-avatar {
    width: 72px; height: 72px;
    border-radius: 50%; object-fit: cover;
    flex-shrink: 0;
}
.author-bio-avatar-placeholder {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--navy);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold); font-weight: 700; font-size: 1.4rem;
    flex-shrink: 0;
}
.author-bio-name {
    font-family: var(--font-serif);
    font-size: 1.1rem; font-weight: 700;
    color: var(--navy); margin-bottom: 8px;
}
.author-bio-desc { font-size: 0.92rem; color: var(--text-mid); line-height: 1.65; }

/* ─── Newsletter CTA ─────────────────────────────────────── */
.newsletter-cta {
    background: var(--navy);
    color: var(--bg);
    padding: 64px 24px;
    text-align: center;
    margin: 56px 0 0;
}
.newsletter-cta h2 {
    font-family: var(--font-serif);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700; margin-bottom: 12px;
    color: #fff;
}
.newsletter-cta p {
    font-size: 1rem; color: rgba(240,236,228,0.75);
    max-width: 440px; margin: 0 auto 28px;
}
.newsletter-cta .btn-subscribe-cta {
    display: inline-block;
    background: var(--gold); color: var(--navy);
    font-weight: 700; font-size: 0.95rem;
    padding: 14px 32px; border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
}
.newsletter-cta .btn-subscribe-cta:hover { background: var(--gold-hover); }

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
    background: var(--navy); color: rgba(240,236,228,0.6);
    padding: 32px 0;
    font-size: 0.85rem;
}
.site-footer .container {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
}
.footer-logo {
    font-family: var(--font-serif);
    font-weight: 600; color: rgba(240,236,228,0.9);
}
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-nav a { color: rgba(240,236,228,0.6); transition: color 0.2s; }
.footer-nav a:hover { color: var(--gold); }

/* ─── Tag / Archive Page ─────────────────────────────────── */
.tag-header { padding: 56px 0 40px; border-bottom: 1px solid var(--border); }
.tag-header h1 {
    font-family: var(--font-serif);
    font-size: 2rem; font-weight: 700;
    color: var(--navy); margin-bottom: 8px;
}
.tag-header p { color: var(--text-muted); font-size: 1rem; }

/* ─── Error Page ─────────────────────────────────────────── */
.error-page { text-align: center; padding: 120px 24px; }
.error-page h1 {
    font-family: var(--font-serif);
    font-size: 3rem; color: var(--navy); margin-bottom: 16px;
}
.error-page p { color: var(--text-muted); margin-bottom: 32px; }
.btn-back {
    display: inline-block;
    background: var(--gold); color: var(--navy);
    font-weight: 600; padding: 12px 28px; border-radius: 2px;
}

/* ─── Koenig Editor (required) ──────────────────────────── */
.kg-width-wide  { margin: 32px -48px; }
.kg-width-full  { margin: 32px calc(50% - 50vw); width: 100vw; }
.kg-image-card  { margin: 32px 0; }
.kg-image-card img { border-radius: var(--radius); }
.kg-gallery-container { margin: 32px 0; }
.kg-gallery-row { display: flex; gap: 8px; margin-bottom: 8px; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.kg-bookmark-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 24px 0; }
.kg-callout-card { background: var(--bg-mid); border-radius: var(--radius); padding: 20px 24px; margin: 24px 0; display: flex; gap: 16px; }
.kg-toggle-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 24px 0; }
.kg-video-card { margin: 32px 0; }
.kg-video-card video { width: 100%; border-radius: var(--radius); }
.kg-audio-card { background: var(--bg-mid); border-radius: var(--radius); padding: 16px; margin: 24px 0; }
.kg-embed-card { margin: 32px 0; }
.kg-embed-card iframe { width: 100%; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
    html { font-size: 16px; }
    .site-nav a:not(.btn-subscribe) { display: none; }
    .post-card { grid-template-columns: 1fr; }
    .post-card-image, .post-card-image-placeholder { display: none; }
    .author-bio { flex-direction: column; padding: 24px; }
    .site-footer .container { flex-direction: column; text-align: center; }
    .footer-nav { justify-content: center; }
}
@media (max-width: 480px) {
    .post-title { font-size: 1.6rem; }
}
