/* ==========================================================
   SINGLE POST — single.php
   Formal document aesthetic. Dense copy, maximum legibility.
   ========================================================== */

/* ── Post Header ──────────────────────────────────────── */
.post-header {
    padding: 80px 0 0;
    background: var(--com-white);
}

/* Category badges */
.post-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.post-cat-badge {
    display: inline-block;
    padding: 4px 14px;
    background: transparent;
    border: 1px solid rgba(217, 189, 144, 0.7);
    color: #8a6c3e;
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-cat-badge:hover {
    background: var(--com-gold);
    border-color: var(--com-gold);
    color: var(--com-black);
}

/* Post H1 */
.post-title {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--com-black);
    margin: 0 0 28px;
}

/* Deck / excerpt */
.post-deck {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    line-height: 1.65;
    color: #555;
    margin: 0 0 32px;
    border: none;
}

/* Byline */
.post-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    color: var(--com-gray-mid);
    letter-spacing: 0.01em;
}

.post-byline__author {
    font-weight: 400;
    color: var(--com-black);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
}

.post-byline__sep {
    color: #ccc;
}

.post-byline__date,
.post-byline__read {
    color: #888;
}

/* Rule under header */
.post-header__rule {
    margin-top: 36px;
    height: 1px;
    background: linear-gradient(
        to right,
        var(--com-black) 0%,
        var(--com-black) 40px,
        #e5e5e5 40px,
        #e5e5e5 100%
    );
}

/* ── Featured Image ───────────────────────────────────── */
.post-featured-image {
    margin: 56px 0 0;
    width: 100%;
    max-height: 520px;
    overflow: hidden;
    position: relative;
}

.post-featured-image__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.5s ease;
    filter: grayscale(20%);
}

.post-featured-image:hover .post-featured-image__img {
    filter: grayscale(0%);
}

/* ── Post Body (the reading zone) ─────────────────────── */
.post-body {
    padding: 72px 0 0;
}

.post-entry-content {
    font-family: var(--font-sans);
    font-size: 1.08rem;
    line-height: 1.8;          /* Generous leading for dense copy, but slightly reduced */
    color: #1e1e1e;
}

/* Headings — chapter-like hierarchy */
.post-entry-content h2 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    line-height: 1.15;
    margin-top: 72px;
    margin-bottom: 20px;
    color: var(--com-black);
    letter-spacing: -0.02em;
    /* Counter for chapter numbering feel */
    position: relative;
}

.post-entry-content h3 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    margin-top: 48px;
    margin-bottom: 12px;
    color: var(--com-black);
    letter-spacing: -0.01em;
}

.post-entry-content h4 {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--com-gray-mid);
    margin-top: 36px;
    margin-bottom: 8px;
}

.post-entry-content p {
    margin-bottom: 28px;
}

/* Drop-cap on first paragraph after h1 */
.post-entry-content > p:first-child::first-letter {
    font-family: var(--font-serif);
    float: left;
    font-size: 4rem;
    line-height: 0.78;
    margin-right: 8px;
    margin-top: 6px;
    color: var(--com-black);
    font-weight: 400;
}

/* Links */
.post-entry-content a {
    color: var(--com-black);
    text-decoration: underline;
    text-decoration-color: rgba(217, 189, 144, 0.5);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.3s, color 0.3s;
}

.post-entry-content a:hover {
    color: #8a6c3e;
    text-decoration-color: var(--com-gold);
}

/* Blockquote — pull quote style */
.post-entry-content blockquote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    line-height: 1.5;
    border-left: 3px solid var(--com-gold);
    padding: 20px 0 20px 40px;
    margin: 64px 0;
    color: var(--com-black);
}

.post-entry-content blockquote cite {
    display: block;
    margin-top: 12px;
    font-family: var(--font-sans);
    font-style: normal;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--com-gray-mid);
}

/* Figures / images */
.post-entry-content figure {
    margin: 60px 0;
}

.post-entry-content figure img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(15%);
    transition: filter 0.4s ease;
}

.post-entry-content figure:hover img {
    filter: grayscale(0%);
}

.post-entry-content figcaption {
    margin-top: 12px;
    font-size: 0.78rem;
    color: #999;
    text-align: center;
    font-style: italic;
}

/* Lists */
.post-entry-content ul,
.post-entry-content ol {
    padding-left: 1.5rem;
    margin-bottom: 28px;
}

.post-entry-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

/* Horizontal rule */
.post-entry-content hr {
    border: none;
    height: 1px;
    background: var(--com-gold);
    margin: 72px 0;
    width: 100%;
}

/* Code */
.post-entry-content code {
    font-size: 0.88em;
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 2px;
    font-family: 'Courier New', monospace;
    color: #333;
}

.post-entry-content pre {
    background: #111;
    color: #eee;
    padding: 28px 32px;
    overflow-x: auto;
    margin: 40px 0;
    font-size: 0.88rem;
    line-height: 1.7;
}

/* ── Post Footer ──────────────────────────────────────── */
.post-footer {
    padding: 72px 0 96px;
}

/* Tags section */
.post-tags {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 40px;
    border-top: 1px solid #eee;
    margin-bottom: 48px;
}

.post-tags__label {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #aaa;
    white-space: nowrap;
    flex-shrink: 0;
}

.post-tags__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-tag-pill {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 100px;
    border: 1px solid #e0e0e0;
    background: transparent;
    color: #555;
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: all 0.25s ease;
}

.post-tag-pill:hover {
    background: var(--com-black);
    border-color: var(--com-black);
    color: var(--com-white);
    transform: translateY(-1px);
}

/* Meta row */
.post-footer__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.post-footer__updated {
    font-size: 0.75rem;
    color: #bbb;
    font-style: italic;
}

.post-footer__back {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--com-black);
    text-decoration: none;
    border-bottom: 1px solid var(--com-black);
    padding-bottom: 2px;
    transition: color 0.3s, border-color 0.3s;
}

.post-footer__back:hover {
    color: var(--com-gold);
    border-color: var(--com-gold);
}

/* ── CTA wrapper ──────────────────────────────────────── */
.post-cta-wrapper {
    padding-top: 0;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
    .post-header {
        padding-top: 56px;
    }

    .post-title {
        font-size: 1.9rem;
    }

    .post-featured-image {
        margin-top: 40px;
        max-height: 320px;
    }

    .post-body {
        padding-top: 48px;
    }

    .post-entry-content > p:first-child::first-letter {
        font-size: 3rem;
    }

    .post-entry-content blockquote {
        padding-left: 24px;
        margin: 48px 0;
    }

    .post-footer {
        padding: 48px 0 72px;
    }

    .post-footer__meta {
        flex-direction: column;
        align-items: flex-start;
    }
}
