/* ── Design tokens (mirrors index.html) ── */
:root {
    --peach:       #F5C4B5;
    --peach-light: #FDE8DF;
    --peach-deep:  #E8A990;
    --chocolate:   #5C2E0A;
    --choc-hover:  #7A3D0F;
    --brown:       #8B4513;
    --cream:       #FAF7F4;
    --white:       #FFFFFF;
    --text:        #1A0A00;
    --muted:       #7A5C4A;
    --border:      #EDE0D8;
    --radius-sm:   16px;
    --radius-md:   24px;
    --radius-lg:   32px;
    --shadow-sm:   0 2px 8px rgba(92,46,10,0.08);
    --shadow-md:   0 8px 28px rgba(92,46,10,0.14);
    --shadow-lg:   0 20px 60px rgba(92,46,10,0.2);
    --transition:  150ms ease-out;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Nunito', -apple-system, sans-serif;
    background: var(--white);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ── Nav ── */
nav {
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 14px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 200;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer; }
.logo-icon-wrap {
    background: #F5C4B5;
    border-radius: 10px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.logo-icon-wrap img { height: 36px; width: 36px; object-fit: contain; border-radius: 6px; display: block; }
.nav-logo-text { font-family: 'Fredoka', sans-serif; font-size: 18px; font-weight: 700; color: var(--chocolate); line-height: 1.1; }
.nav-logo-text span { display: block; font-family: 'Nunito', sans-serif; font-size: 11px; font-weight: 600; color: var(--brown); opacity: 0.75; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
    color: var(--chocolate);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 50px;
    transition: background var(--transition), color var(--transition);
    min-height: 44px;
    display: flex;
    align-items: center;
}
.nav-link:hover { background: var(--peach-light); }
.nav-link.active { background: var(--peach); }
.nav-cta {
    background: var(--chocolate);
    color: white;
    text-decoration: none;
    padding: 11px 22px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.01em;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 16px rgba(92,46,10,0.35);
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
}
.nav-cta:hover { background: var(--choc-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(92,46,10,0.45); }

/* ── Blog header ── */
.blog-header {
    background: linear-gradient(155deg, var(--peach-light) 0%, var(--peach) 50%, var(--peach-deep) 100%);
    padding: 56px 24px 48px;
    text-align: center;
}
.blog-header h1 {
    font-family: 'Fredoka', sans-serif;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 700;
    color: var(--chocolate);
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}
.blog-header p {
    font-size: 17px;
    color: var(--brown);
    font-weight: 500;
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ── Post grid ── */
.post-feed {
    max-width: 1100px;
    margin: 0 auto;
    padding: 56px 24px 80px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* ── Post card ── */
.post-card {
    background: var(--cream);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-card-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: var(--peach-light);
}
.post-card-image-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--peach-light), var(--peach));
    display: flex;
    align-items: center;
    justify-content: center;
}
.post-card-body { padding: 24px 28px 28px; flex: 1; display: flex; flex-direction: column; }
.post-card-tag {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--chocolate);
    margin-bottom: 10px;
    opacity: 0.7;
}
.post-card-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--chocolate);
    line-height: 1.25;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}
.post-card-excerpt {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.75;
    font-weight: 500;
    flex: 1;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
}
.post-card-meta .dot { opacity: 0.4; }

/* ── Single post ── */
.post-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 24px 96px;
}
.post-page-tag {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--chocolate);
    opacity: 0.7;
    margin-bottom: 12px;
}
.post-page-title {
    font-family: 'Fredoka', sans-serif;
    font-size: clamp(28px, 4.5vw, 44px);
    font-weight: 700;
    color: var(--chocolate);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}
.post-page-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}
.post-page-meta .dot { opacity: 0.4; }
.post-page-image {
    width: 100%;
    border-radius: var(--radius-md);
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
}
.post-page-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text);
    font-weight: 400;
}
.post-page-content h2,
.post-page-content h3,
.post-page-content h4 {
    font-family: 'Fredoka', sans-serif;
    color: var(--chocolate);
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin: 2em 0 0.6em;
}
.post-page-content h2 { font-size: 28px; }
.post-page-content h3 { font-size: 22px; }
.post-page-content h4 { font-size: 18px; }
.post-page-content p { margin-bottom: 1.5em; }
.post-page-content a { color: var(--chocolate); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.post-page-content a:hover { color: var(--choc-hover); }
.post-page-content ul,
.post-page-content ol { margin: 0 0 1.5em 1.5em; }
.post-page-content li { margin-bottom: 0.5em; }
.post-page-content blockquote {
    border-left: 4px solid var(--peach-deep);
    padding: 12px 20px;
    background: var(--peach-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--brown);
    margin: 1.5em 0;
}
.post-page-content > p img {
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    margin: 1.5em auto;
    display: block;
    max-width: 100%;
    height: auto;
}
.post-page-content code {
    background: var(--cream);
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.9em;
    color: var(--chocolate);
    border: 1px solid var(--border);
}
.post-page-content pre {
    background: var(--cream);
    padding: 20px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    border: 1px solid var(--border);
    margin: 1.5em 0;
}
.post-page-content pre code { background: none; border: none; padding: 0; }
.post-page-content hr {
    border: none;
    border-top: 2px solid var(--border);
    margin: 3em 0;
}

/* ── App CTA strip ── */
.blog-cta-strip {
    background: var(--chocolate);
    padding: 48px 24px;
    text-align: center;
}
.blog-cta-strip p {
    font-family: 'Fredoka', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
}
.blog-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--peach);
    color: var(--chocolate);
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
    transition: transform var(--transition), box-shadow var(--transition);
    min-height: 52px;
}
.blog-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 44px rgba(0,0,0,0.3); background: var(--peach-light); }

/* ── Post navigation ── */
.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}
.post-nav a {
    text-decoration: none;
    color: var(--chocolate);
    font-size: 14px;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 50px;
    border: 2px solid var(--border);
    transition: background var(--transition), border-color var(--transition);
    max-width: 48%;
}
.post-nav a:hover { background: var(--peach-light); border-color: var(--peach-deep); }
.post-nav .prev::before { content: '← '; }
.post-nav .next::after { content: ' →'; }

/* ── Footer ── */
footer {
    background: #100800;
    color: #6B5040;
    padding: 48px 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Nunito', sans-serif;
}
.footer-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 24px; text-decoration: none; cursor: pointer; }
.footer-logo .logo-icon-wrap { border-radius: 8px; padding: 3px; opacity: 0.9; background: #F5C4B5; }
.footer-logo .logo-icon-wrap img { height: 30px; width: 30px; border-radius: 6px; }
.footer-logo-text { font-family: 'Fredoka', sans-serif; font-size: 16px; font-weight: 700; color: #9B7A65; }
.footer-links { display: flex; gap: 24px; justify-content: center; margin-bottom: 20px; flex-wrap: wrap; }
footer a { color: #7A5C4A; text-decoration: none; transition: color var(--transition); cursor: pointer; }
footer a:hover { color: #C4A090; }

/* ── Koenig cards (Ghost editor) ── */

.kg-card { margin: 2em 0; }
.kg-card figcaption {
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    margin-top: 6px;
    font-style: italic;
    line-height: 1.5;
}

/* Images */
.kg-image-card { margin: 2em 0; }
.kg-image-card img,
.kg-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    margin: 0 auto;
}

/* Wide / full breakout from the centered 720px content column */
.kg-width-wide {
    width: 85vw;
    margin-left: calc(50% - 42.5vw);
    margin-right: calc(50% - 42.5vw);
}
.kg-width-full {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}
.kg-width-wide img  { width: 100%; height: auto; border-radius: var(--radius-sm); box-shadow: none; margin: 0; }
.kg-width-full img  { width: 100%; height: auto; border-radius: 0; box-shadow: none; margin: 0; }

/* Gallery */
.kg-gallery-card { margin: 2em 0; }
.kg-gallery-container { display: flex; flex-direction: column; gap: 6px; }
.kg-gallery-row { display: flex; gap: 6px; }
.kg-gallery-image { flex: 1; min-width: 0; overflow: hidden; border-radius: var(--radius-sm); }
.kg-gallery-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
}

/* Embed (YouTube, Vimeo, Spotify…) */
.kg-embed-card { margin: 2em 0; }
.kg-embed-card iframe {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: var(--radius-sm);
}
.kg-embed-card video {
    display: block;
    width: 100%;
    border: none;
    border-radius: var(--radius-sm);
}
/* Responsive 16:9 wrapper injected by older Ghost versions */
.fluid-width-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-sm);
}
.fluid-width-video-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    aspect-ratio: unset;
    border-radius: 0;
}

/* Bookmark */
.kg-bookmark-card { margin: 2em 0; }
.kg-bookmark-container {
    display: flex;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--cream);
    transition: box-shadow var(--transition);
}
.kg-bookmark-container:hover { box-shadow: var(--shadow-sm); }
.kg-bookmark-content { flex: 1; padding: 16px 20px; min-width: 0; }
.kg-bookmark-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; line-height: 1.4; }
.kg-bookmark-description {
    font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 10px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.kg-bookmark-metadata { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.kg-bookmark-icon { width: 16px; height: 16px; border-radius: 2px; box-shadow: none; margin: 0; }
.kg-bookmark-thumbnail { width: 120px; flex-shrink: 0; }
.kg-bookmark-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; box-shadow: none; margin: 0; }

/* Callout */
.kg-callout-card {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 18px 22px; margin: 2em 0;
    background: var(--peach-light); border: 1px solid var(--peach); border-radius: var(--radius-sm);
}
.kg-callout-card-grey { background: var(--cream); border-color: var(--border); }
.kg-callout-emoji { font-size: 22px; flex-shrink: 0; line-height: 1.6; }
.kg-callout-text { font-size: 16px; line-height: 1.7; color: var(--text); }

/* Toggle */
.kg-toggle-card { margin: 2em 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.kg-toggle-heading {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; cursor: pointer; background: var(--cream);
    font-weight: 700; font-size: 15px; user-select: none;
}
.kg-toggle-content { padding: 14px 18px; border-top: 1px solid var(--border); font-size: 15px; line-height: 1.7; }
.kg-toggle-card[data-kg-toggle-state=close] .kg-toggle-content { display: none; }

/* Button */
.kg-button-card { margin: 2em 0; text-align: center; }
.kg-btn {
    display: inline-flex; align-items: center;
    padding: 12px 28px; border-radius: 50px;
    background: var(--chocolate); color: white !important;
    text-decoration: none; font-weight: 700; font-size: 15px;
    transition: background var(--transition), transform var(--transition); cursor: pointer;
}
.kg-btn:hover { background: var(--choc-hover); transform: translateY(-1px); }

/* Divider */
.kg-divider-card { margin: 3em 0; border: none; border-top: 2px solid var(--border); }

/* Video */
.kg-video-card { margin: 2em 0; }
.kg-video-card video { display: block; width: 100%; border-radius: var(--radius-sm); }

/* Audio */
.kg-audio-card {
    margin: 2em 0; padding: 16px 20px;
    background: var(--cream); border: 1px solid var(--border); border-radius: var(--radius-sm);
    display: flex; align-items: center; gap: 14px;
}
.kg-audio-card audio { flex: 1; min-width: 0; }

/* File download */
.kg-file-card { margin: 2em 0; }
.kg-file-card-container {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--cream); text-decoration: none; color: inherit;
    transition: box-shadow var(--transition);
}
.kg-file-card-container:hover { box-shadow: var(--shadow-sm); }
.kg-file-card-title { font-weight: 700; color: var(--text); font-size: 15px; }
.kg-file-card-caption { font-size: 13px; color: var(--muted); margin-top: 2px; }
.kg-file-card-metadata { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 600; }

/* ── Pagination ── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 0 24px 64px;
    font-size: 14px;
    font-weight: 700;
}
.pagination a {
    color: var(--chocolate);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 50px;
    border: 2px solid var(--border);
    transition: background var(--transition);
    min-height: 44px;
    display: flex;
    align-items: center;
}
.pagination a:hover { background: var(--peach-light); border-color: var(--peach-deep); }
.pagination .page-number { color: var(--muted); }

/* ── Empty state ── */
.no-posts {
    text-align: center;
    padding: 80px 24px;
    color: var(--muted);
    font-size: 16px;
    font-weight: 500;
    grid-column: 1 / -1;
}
.no-posts strong {
    display: block;
    font-family: 'Fredoka', sans-serif;
    font-size: 24px;
    color: var(--chocolate);
    margin-bottom: 8px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    nav { padding: 12px 20px; }
    .nav-links { display: none; }
    .post-feed { padding: 40px 16px 64px; gap: 16px; }
    .post-page { padding: 32px 20px 72px; }
    .blog-header { padding: 40px 20px 36px; }
}
