/* ============================================================
   KittyButts custom branding layer for the Source theme.
   Loaded AFTER built/screen.css in default.hbs — everything the
   visitor should feel as "a cat site, not a default Ghost blog"
   lives here: warm cream palette, persimmon accent, Fraunces
   display type, rounded friendly cards, paw-print touches,
   a dark warm footer, and the custom homepage (kbh-*) sections.
   ============================================================ */

:root {
    --kb-cream: #FFF8EF;
    --kb-card: #FFFDF9;
    --kb-ink: #2E2018;
    --kb-muted: #7A6753;
    --kb-accent: #E4572E;
    --kb-accent-dark: #C7431F;
    --kb-teal: #1F7A6D;
    --kb-gold: #F2A93B;
    --kb-line: #F0DFCE;
    --kb-soft: #FDEBD9;
    --kb-dark: #33261A;
    --kb-shadow: 0 10px 30px rgba(94, 52, 18, .10), 0 2px 6px rgba(94, 52, 18, .06);

    /* Rebrand the theme's own font/accent hooks */
    --font-sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-serif: "Fraunces", Georgia, serif;
    --font-serif-alt: "Fraunces", Georgia, serif;
    --gh-font-heading: "Fraunces", Georgia, serif;
    --gh-font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --ghost-accent-color: #E4572E !important;
    --color-primary-text: #2E2018;
    --color-secondary-text: #7A6753;
    --color-border: #F0DFCE;
}

body {
    background-color: var(--kb-cream);
    background-image: radial-gradient(rgba(228, 87, 46, .05) 1.5px, transparent 1.6px);
    background-size: 26px 26px;
    color: var(--kb-ink);
}

::selection { background: var(--kb-soft); color: var(--kb-accent-dark); }

.is-title { font-family: var(--gh-font-heading); letter-spacing: -0.01em; }

/* ---------- Header / navigation ---------- */
.gh-navigation {
    background: rgba(255, 248, 239, .94);
    backdrop-filter: blur(8px);
    border-bottom: 2px solid var(--kb-line);
}
.gh-navigation-logo img { max-height: 54px; width: auto; }
.gh-navigation-menu a, .gh-navigation a { font-weight: 700; }
.gh-navigation-menu .nav a { border-radius: 999px; padding: 6px 12px; transition: background .15s ease, color .15s ease; }
.gh-navigation-menu .nav a:hover { background: var(--kb-soft); color: var(--kb-accent-dark); opacity: 1; }
.gh-navigation-menu .nav-current a { background: var(--kb-accent); color: #fff !important; }

.gh-button {
    background-color: var(--kb-accent);
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(228, 87, 46, .35);
    font-weight: 800;
    transition: transform .12s ease, background .15s ease;
}
.gh-button:hover { background-color: var(--kb-accent-dark); transform: translateY(-1px); opacity: 1; }

/* ---------- Post feed cards ---------- */
.gh-container-title { font-family: var(--gh-font-heading); font-weight: 800; }
.gh-container-title::before { content: "🐾 "; }

.gh-card { border-color: var(--kb-line); }
.gh-card-tag {
    color: var(--kb-teal) !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.gh-card-title { font-weight: 800; }
.gh-card-link { transition: transform .15s ease; }
.gh-card-link:hover .gh-card-title { color: var(--kb-accent-dark); }
.gh-card-image img { border-radius: 16px; }

.gh-container.is-grid .gh-card {
    background: var(--kb-card);
    border: 1px solid var(--kb-line);
    border-radius: 20px;
    box-shadow: var(--kb-shadow);
    overflow: hidden;
}
.gh-container.is-grid .gh-card-image img { border-radius: 0; }
.gh-container.is-grid .gh-card-wrapper { padding: 4px 20px 14px; }
.gh-container.is-grid .gh-card-link:hover { transform: translateY(-3px); }

/* ---------- Article pages ---------- */
.gh-content a { color: var(--kb-accent-dark); text-decoration-color: var(--kb-gold); text-decoration-thickness: 2px; }
.gh-content blockquote { border-left: 4px solid var(--kb-gold); background: var(--kb-card); border-radius: 0 14px 14px 0; }
.kg-callout-card, .kg-toggle-card, .kg-file-card { border-color: var(--kb-line) !important; border-radius: 16px !important; }

/* ---------- Footer: warm dark, paw divider ---------- */
.gh-footer {
    background: var(--kb-dark);
    color: #F7E9D7;
    position: relative;
    margin-top: 40px;
}
.gh-footer::before {
    content: "";
    position: absolute; top: -14px; left: 0; right: 0; height: 28px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='%23E4572E'%3E%3Cellipse cx='50' cy='66' rx='21' ry='16'/%3E%3Ccircle cx='21' cy='40' r='9'/%3E%3Ccircle cx='40' cy='27' r='10'/%3E%3Ccircle cx='61' cy='27' r='10'/%3E%3Ccircle cx='80' cy='40' r='9'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 28px 28px;
    background-repeat: repeat-x;
    background-position: center;
    opacity: .9;
}
.gh-footer h2, .gh-footer .is-title { color: #FFF6E9; }
.gh-footer p, .gh-footer-signup-subhead { color: #D9C4A9; }
.gh-footer a { color: #F2C894; }
.gh-footer a:hover { color: #fff; }
.gh-footer-copyright { color: #B99B78; }
.gh-footer .gh-form, .gh-footer form { background: #fff; border-radius: 999px; }

/* ============================================================
   Custom homepage (kbh-*)
   ============================================================ */
.kbh-h2 { font-family: var(--gh-font-heading); font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 800; margin: 0 0 .3em; }
.kbh-sub { color: var(--kb-muted); font-size: 1.05rem; margin: 0 0 22px; max-width: 62ch; }

/* Hero */
.kbh-hero { padding: 56px 0 30px; }
.kbh-hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 36px; align-items: center; }
@media (max-width: 880px) { .kbh-hero-inner { grid-template-columns: 1fr; } }
.kbh-eyebrow { letter-spacing: .12em; font-size: .8rem; font-weight: 800; color: var(--kb-teal); text-transform: uppercase; }
.kbh-title { font-family: var(--gh-font-heading); font-size: clamp(2.6rem, 6vw, 4.2rem); font-weight: 800; line-height: 1.04; margin: .22em 0 .35em; }
.kbh-title span { color: var(--kb-accent); }
.kbh-lede { font-size: 1.14rem; color: #5C4632; max-width: 56ch; margin: 0; }
.kbh-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.kbh-btn {
    display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
    font-weight: 800; font-size: 1rem; padding: 13px 24px; border-radius: 999px;
    transition: transform .12s ease, background .15s ease;
}
.kbh-btn-primary { background: var(--kb-accent); color: #fff !important; box-shadow: 0 8px 20px rgba(228, 87, 46, .35); }
.kbh-btn-primary:hover { background: var(--kb-accent-dark); transform: translateY(-1px); }
.kbh-btn-ghost { background: #fff; color: var(--kb-accent-dark) !important; border: 2px solid var(--kb-accent); }
.kbh-btn-ghost:hover { background: var(--kb-soft); transform: translateY(-1px); }
.kbh-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.kbh-badges span { background: var(--kb-soft); border: 1px solid var(--kb-line); color: #8A4B12; font-weight: 800; font-size: .8rem; padding: 4px 12px; border-radius: 999px; }

.kbh-hero-post {
    display: block; text-decoration: none; color: var(--kb-ink);
    background: var(--kb-card); border: 1px solid var(--kb-line); border-radius: 24px;
    box-shadow: var(--kb-shadow); overflow: hidden; transform: rotate(1.2deg);
    transition: transform .2s ease;
}
.kbh-hero-post:hover { transform: rotate(0deg) translateY(-3px); }
.kbh-hero-post img { width: 100%; height: 250px; object-fit: cover; display: block; }
.kbh-hero-post-tag { display: inline-block; margin: 16px 20px 0; background: var(--kb-accent); color: #fff; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 11px; border-radius: 999px; }
.kbh-hero-post-title { display: block; font-family: var(--gh-font-heading); font-weight: 800; font-size: 1.35rem; line-height: 1.25; padding: 8px 20px 20px; }

/* Tools band */
.kbh-tools { padding: 26px 0 8px; }
.kbh-tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.kbh-tool {
    display: block; text-decoration: none; color: var(--kb-ink);
    background: var(--kb-card); border: 1px solid var(--kb-line); border-radius: 20px;
    padding: 20px; box-shadow: var(--kb-shadow); transition: transform .15s ease;
}
.kbh-tool:hover { transform: translateY(-4px); }
.kbh-tool .kbh-tool-emoji { font-size: 1.9rem; }
.kbh-tool h3 { font-family: var(--gh-font-heading); font-size: 1.12rem; font-weight: 800; margin: .35em 0 .25em; }
.kbh-tool p { color: #5C4632; font-size: .93rem; margin: 0; }
.kbh-tool-hub {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    margin-top: 16px; background: var(--kb-dark); color: #F7E9D7; border-radius: 20px; padding: 20px 24px;
    text-decoration: none; transition: transform .15s ease;
}
.kbh-tool-hub:hover { transform: translateY(-2px); color: #fff; }
.kbh-tool-hub strong { font-family: var(--gh-font-heading); font-size: 1.15rem; }
.kbh-tool-hub span { font-weight: 800; color: var(--kb-gold); }

/* Topics band */
.kbh-topics { padding: 30px 0 4px; }
.kbh-topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.kbh-topic {
    display: flex; flex-direction: column; gap: 2px; text-decoration: none;
    background: #fff; border: 1.5px solid var(--kb-line); border-radius: 16px; padding: 15px 18px;
    transition: border-color .15s ease, transform .15s ease;
}
.kbh-topic:hover { border-color: var(--kb-accent); transform: translateY(-2px); }
.kbh-topic-name { font-family: var(--gh-font-heading); font-weight: 800; font-size: 1.05rem; color: var(--kb-ink); }
.kbh-topic-count { font-size: .83rem; font-weight: 700; color: var(--kb-teal); }

/* About strip */
.kbh-about { padding: 34px 0 10px; }
.kbh-about-inner {
    display: flex; gap: 22px; align-items: flex-start;
    background: var(--kb-card); border: 1px solid var(--kb-line); border-radius: 24px;
    box-shadow: var(--kb-shadow); padding: 28px;
}
@media (max-width: 640px) { .kbh-about-inner { flex-direction: column; } }
.kbh-about-emoji { font-size: 2.6rem; line-height: 1; }
.kbh-about p { color: #5C4632; margin: 0 0 16px; max-width: 68ch; }

/* ---------- v1.7.9 live-audit fixes ---------- */
/* Header right-side actions sat on the site's white --background-color,
   showing as a white box on the cream header — make it transparent. */
.gh-navigation-actions { background-color: transparent; }
/* Logo artwork has a white canvas; multiply blends it into the cream header. */
.gh-navigation-logo img { mix-blend-mode: multiply; }
