/* ─────────────────────────────────────────────
   BLOG — archive + single, matching home design
   ───────────────────────────────────────────── */

/* Layout safety on WP-rendered pages: push content below fixed nav */
body.devy-shell { background: var(--paper); color: var(--text); font-family: var(--font-body); }
body.devy-shell .devy-main { padding-top: 96px; }
body.devy-shell .nav { background: rgba(250, 245, 238, .92); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); box-shadow: 0 1px 0 rgba(229, 220, 201, .6); }

/* Hide Astra completely if it somehow renders */
body.devy-shell #masthead,
body.devy-shell #colophon,
body.devy-shell .site-header,
body.devy-shell .site-footer,
body.devy-shell .ast-primary-header-bar,
body.devy-shell .ast-below-header,
body.devy-shell .ast-mobile-header { display: none !important; }

/* Hero ribbon for archive pages */
.devy-archive-hero {
    padding: 7rem 0 3.5rem;
    background: linear-gradient(180deg, var(--paper) 0%, var(--paper-soft) 100%);
    border-bottom: 1px solid rgba(229, 220, 201, .8);
    text-align: center;
}
.devy-archive-hero .container { max-width: 760px; }
.devy-archive-hero .eyebrow {
    display: inline-block; margin-bottom: 1rem;
    font-family: var(--font-body); font-size: .75rem; letter-spacing: .22em; text-transform: uppercase;
    color: var(--sage-dark); font-weight: 600;
}
.devy-archive-hero h1 {
    font-family: var(--font-display); font-weight: 500;
    font-size: clamp(2.2rem, 4.5vw, 3.4rem); line-height: 1.1;
    color: var(--text); margin: 0 0 1rem;
}
.devy-archive-hero h1 em { font-style: italic; color: var(--sage-dark); font-weight: 400; }
.devy-archive-hero p { color: var(--text-mute); font-size: 1.05rem; line-height: 1.6; margin: 0 auto; max-width: 560px; }

/* Posts grid */
.devy-posts {
    padding: 4rem 0 6rem;
}
.devy-posts__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}
.devy-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(229, 220, 201, .6);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .02), 0 12px 28px -22px rgba(46, 84, 72, .25);
    transition: transform .35s var(--ease-out, cubic-bezier(.22, 1, .36, 1)), box-shadow .35s, border-color .35s;
    display: flex; flex-direction: column;
}
.devy-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px -28px rgba(46, 84, 72, .35);
    border-color: rgba(74, 124, 107, .35);
}
.devy-card__media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--sage-light, #d5e5d8) 0%, var(--sage, #4a7c6b) 100%);
}
.devy-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.devy-card:hover .devy-card__media img { transform: scale(1.04); }
.devy-card__body { padding: 1.5rem 1.5rem 1.65rem; display: flex; flex-direction: column; gap: .65rem; flex: 1; }
.devy-card__cat {
    font-family: var(--font-body); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
    color: var(--sage-dark); font-weight: 600;
}
.devy-card__title {
    font-family: var(--font-display); font-weight: 500;
    font-size: 1.3rem; line-height: 1.25; color: var(--text);
    margin: 0;
}
.devy-card__title a { color: inherit; text-decoration: none; transition: color .25s; }
.devy-card__title a:hover { color: var(--sage-dark); }
.devy-card__excerpt { color: var(--text-mute); font-size: .94rem; line-height: 1.6; margin: 0; }
.devy-card__meta {
    margin-top: auto; padding-top: 1rem;
    display: flex; align-items: center; gap: .75rem;
    font-size: .82rem; color: var(--text-mute); border-top: 1px solid rgba(229, 220, 201, .6);
}
.devy-card__meta time { font-variant-numeric: tabular-nums; }
.devy-card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-mute); opacity: .5; }

/* Single post */
.devy-single { padding: 4.5rem 0 6rem; }
.devy-single__inner { max-width: 760px; margin: 0 auto; }
.devy-single__eyebrow {
    display: inline-block; font-family: var(--font-body); font-size: .72rem;
    letter-spacing: .22em; text-transform: uppercase; color: var(--sage-dark); font-weight: 600;
    margin-bottom: 1rem;
}
.devy-single h1 {
    font-family: var(--font-display); font-weight: 500;
    font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.15;
    color: var(--text); margin: 0 0 1.25rem;
}
.devy-single__meta {
    display: flex; align-items: center; gap: .65rem; flex-wrap: wrap;
    font-size: .88rem; color: var(--text-mute); margin-bottom: 2rem;
}
.devy-single__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-mute); opacity: .5; }
.devy-single__hero {
    aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden;
    margin-bottom: 2.5rem;
    background: linear-gradient(135deg, var(--sage-light, #d5e5d8) 0%, var(--sage, #4a7c6b) 100%);
}
.devy-single__hero img { width: 100%; height: 100%; object-fit: cover; }
.devy-single__content {
    font-size: 1.05rem; line-height: 1.75; color: var(--text-soft);
}
.devy-single__content h2 {
    font-family: var(--font-display); font-weight: 500;
    font-size: 1.85rem; line-height: 1.25; color: var(--text);
    margin: 2.5rem 0 1rem;
}
.devy-single__content h3 {
    font-family: var(--font-display); font-weight: 500;
    font-size: 1.4rem; line-height: 1.3; color: var(--text);
    margin: 2rem 0 .75rem;
}
.devy-single__content p { margin: 0 0 1.25rem; }
.devy-single__content a { color: var(--sage-dark); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.devy-single__content a:hover { color: var(--text); }
.devy-single__content img { max-width: 100%; height: auto; border-radius: 12px; margin: 1.5rem 0; }
.devy-single__content ul, .devy-single__content ol { padding-left: 1.25rem; margin: 0 0 1.25rem; }
.devy-single__content li { margin-bottom: .5rem; }
.devy-single__content blockquote {
    border-left: 3px solid var(--sage-dark);
    padding: .5rem 0 .5rem 1.25rem; margin: 1.5rem 0;
    font-family: var(--font-display); font-style: italic; font-size: 1.2rem; color: var(--text);
}

/* Pagination */
.devy-pagination {
    display: flex; justify-content: center; align-items: center; gap: .5rem;
    margin-top: 3.5rem; flex-wrap: wrap;
}
.devy-pagination .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 .8rem;
    border-radius: 999px; border: 1px solid rgba(229, 220, 201, .8);
    font-size: .92rem; color: var(--text-soft); background: #fff;
    transition: border-color .25s, color .25s, background .25s;
}
.devy-pagination .page-numbers:hover { border-color: var(--sage-dark); color: var(--text); }
.devy-pagination .page-numbers.current { background: var(--sage-dark); border-color: var(--sage-dark); color: #fff; }

/* Empty state */
.devy-empty {
    text-align: center; padding: 4rem 0;
    color: var(--text-mute); font-size: 1.05rem;
}
.devy-empty h2 {
    font-family: var(--font-display); font-weight: 500;
    font-size: 1.6rem; color: var(--text); margin: 0 0 .75rem;
}

/* Back link */
.devy-back {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .9rem; color: var(--sage-dark); margin-bottom: 1.5rem;
    text-decoration: none; font-weight: 500;
}
.devy-back:hover { color: var(--text); }
.devy-back svg { width: 16px; height: 16px; }

/* Nav: convert # anchors to behave when not on home */
body.devy-shell .nav__links a { font-size: .92rem; font-weight: 500; }

/* Mobile */
@media (max-width: 880px) {
    body.devy-shell .nav__links { display: none; }
    body.devy-shell .nav__cta .nav__phone { display: none; }
    .devy-archive-hero { padding: 5.5rem 0 2.5rem; }
}
