/* ============================================
   Kyle Miklinevich — Ghost Theme v3.1
   Warm + Dark, Personal Brand
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --color-dark: #1C1B18;
    --color-dark-light: #2a2924;
    --color-cream: #FAFAF7;
    --color-cream-dark: #f2f0ea;
    --color-amber: #E8A435;
    --color-amber-dark: #c98a2a;
    --color-text: #1C1B18;
    --color-text-muted: #6b6860;
    --color-text-light: #8a877f;
    --color-text-on-dark: #FAFAF7;
    --color-text-on-dark-muted: #b8b5ad;
    --color-border: #e8e6e0;
    --color-card: #ffffff;
    --font-serif: 'Georgia', 'Times New Roman', serif;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --max-width: 1120px;
    --content-width: 720px;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-cream);
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* --- Header / Nav --- */
.site-header {
    background: var(--color-dark);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    color: var(--color-text-on-dark);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.site-nav {
    display: flex;
    gap: 28px;
}

.nav-link {
    color: var(--color-text-on-dark-muted);
    font-size: 14px;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.nav-active {
    color: var(--color-text-on-dark);
}

/* Ghost {{navigation}} helper outputs ul.nav > li > a */
.site-nav ul.nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 28px;
}

.site-nav ul.nav li a {
    color: var(--color-text-on-dark-muted);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.site-nav ul.nav li a:hover,
.site-nav ul.nav li.nav-current a {
    color: var(--color-text-on-dark);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text-on-dark);
    transition: 0.3s;
}

/* --- Footer --- */
.site-footer {
    background: var(--color-dark);
    color: var(--color-text-on-dark-muted);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 24px 24px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 32px;
    border-bottom: 1px solid #333;
}

.footer-name {
    color: var(--color-text-on-dark);
    font-size: 15px;
    font-weight: 500;
    display: block;
    margin-bottom: 8px;
}

.footer-tagline {
    font-size: 13px;
    line-height: 1.5;
    max-width: 320px;
}

.footer-links {
    display: flex;
    gap: 24px;
    font-size: 13px;
}

.footer-links a:hover {
    color: var(--color-amber);
}

/* Ghost {{navigation}} in footer */
.footer-links ul.nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links ul.nav li a {
    color: var(--color-text-on-dark-muted);
    font-size: 13px;
    text-decoration: none;
}

.footer-links ul.nav li a:hover {
    color: var(--color-amber);
}

.footer-contact {
    text-align: right;
}

.footer-email {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--color-text-on-dark-muted);
    margin-bottom: 16px;
    transition: color 0.2s;
}

.footer-email:hover {
    color: var(--color-amber);
}

.footer-social {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
}

.footer-social a {
    color: var(--color-text-on-dark-muted);
    transition: color 0.2s;
}

.footer-social a:hover {
    color: var(--color-amber);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    font-size: 12px;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--color-amber);
    color: var(--color-dark);
}

.btn-primary:hover {
    background: var(--color-amber-dark);
}

.btn-outline {
    background: transparent;
    color: var(--color-text-on-dark);
    border: 1px solid #555;
}

.btn-outline:hover {
    border-color: #888;
}

.btn-outline-dark {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-outline-dark:hover {
    border-color: #ccc;
}

/* --- Hero Section (Homepage) --- */
.hero {
    background: var(--color-dark);
    position: relative;
    overflow: hidden;
}

.hero-inner {
    position: relative;
    max-width: var(--max-width);
    margin: 0 auto;
}

.hero-image {
    width: 100%;
    max-height: 480px;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    object-position: center;
    opacity: 0.6;
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 48px 40px;
    background: linear-gradient(transparent, rgba(28, 27, 24, 0.95));
}

/* Fallback when no cover image */
.hero-inner:not(:has(.hero-image)) .hero-content {
    position: relative;
    padding: 80px 40px 72px;
    background: none;
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 400;
    color: var(--color-text-on-dark);
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero-sub {
    font-size: 17px;
    color: var(--color-text-on-dark-muted);
    margin-bottom: 24px;
    line-height: 1.6;
    max-width: 560px;
}

.hero-bar {
    height: 3px;
    background: var(--color-amber);
}

/* --- Section Containers --- */
.section {
    padding: 64px 24px;
}

.section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 15px;
    color: var(--color-text-muted);
    margin-bottom: 40px;
}

/* --- Card Grid --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 28px 24px;
    transition: border-color 0.2s;
}

.card:hover {
    border-color: #ccc;
}

.card-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.card-desc {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.card-link {
    display: inline-block;
    margin-top: 16px;
    font-size: 14px;
    color: var(--color-amber);
    font-weight: 500;
}

.card-link:hover {
    color: var(--color-amber-dark);
}

/* --- Page Header (for inner pages) --- */
.page-header {
    background: var(--color-dark);
    text-align: center;
    padding: 56px 24px;
}

.page-header-title {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 400;
    color: var(--color-text-on-dark);
    margin-bottom: 12px;
}

.page-header-desc {
    font-size: 15px;
    color: var(--color-text-on-dark-muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Content (post/page body) --- */
.content-wrap {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 56px 24px;
}

.content-body {
    font-size: 17px;
    line-height: 1.8;
    color: var(--color-text);
}

.content-body h2 {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 400;
    margin: 48px 0 16px;
}

.content-body h3 {
    font-size: 18px;
    font-weight: 500;
    margin: 36px 0 12px;
}

.content-body p {
    margin-bottom: 24px;
}

.content-body blockquote {
    border-left: 3px solid var(--color-amber);
    padding-left: 20px;
    margin: 32px 0;
    font-family: var(--font-serif);
    font-size: 18px;
    color: var(--color-text-muted);
    font-style: italic;
    line-height: 1.7;
}

.content-body ul, .content-body ol {
    margin: 0 0 24px 24px;
}

.content-body li {
    margin-bottom: 8px;
}

.content-body a {
    color: var(--color-amber-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.content-body a:hover {
    color: var(--color-amber);
}

.content-body img {
    border-radius: 8px;
    margin: 32px 0;
}

.content-body hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 48px 0;
}

/* Ghost content cards */
.kg-width-wide {
    max-width: 1040px;
    margin-left: auto;
    margin-right: auto;
}

.kg-width-full {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.kg-width-full img { width: 100%; }

.kg-image-card img,
.kg-gallery-image img {
    max-width: 100%;
    height: auto;
}

.kg-image-card { margin: 32px 0; }

.kg-image-card figcaption,
.kg-embed-card figcaption {
    font-size: 13px;
    color: var(--color-text-light);
    text-align: center;
    margin-top: 12px;
}

.kg-gallery-card { margin: 32px 0; }
.kg-gallery-container { display: flex; flex-direction: column; gap: 8px; }
.kg-gallery-row { display: flex; gap: 8px; }
.kg-gallery-image img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }

.kg-bookmark-card { margin: 32px 0; }
.kg-bookmark-container { display: flex; border: 1px solid var(--color-border); border-radius: 8px; overflow: hidden; text-decoration: none; color: inherit; }
.kg-bookmark-content { flex: 1; padding: 20px; }
.kg-bookmark-title { font-size: 16px; font-weight: 500; margin-bottom: 8px; }
.kg-bookmark-description { font-size: 14px; color: var(--color-text-muted); line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.kg-bookmark-metadata { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--color-text-light); }
.kg-bookmark-icon { width: 16px; height: 16px; }
.kg-bookmark-thumbnail { width: 180px; min-height: 120px; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }

.kg-embed-card { margin: 32px 0; }
.kg-embed-card iframe { width: 100%; border-radius: 8px; }

/* --- Post Cards (content feed) --- */
.post-feed {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.post-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.post-card:hover { border-color: #ccc; }

.post-card-image {
    height: 200px;
    background: var(--color-cream-dark);
    overflow: hidden;
}

.post-card-image img { width: 100%; height: 100%; object-fit: cover; }

.post-card-body { padding: 24px; }

.post-card-tag {
    font-size: 12px;
    color: var(--color-amber);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.post-card-title { font-size: 18px; font-weight: 500; margin-bottom: 8px; line-height: 1.3; }
.post-card-excerpt { font-size: 14px; color: var(--color-text-muted); line-height: 1.6; margin-bottom: 12px; }
.post-card-meta { font-size: 12px; color: var(--color-text-light); }

/* --- Post Single --- */
.post-header {
    background: var(--color-dark);
    text-align: center;
    padding: 56px 24px;
}

.post-tag {
    font-size: 13px;
    color: var(--color-amber);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    display: block;
}

.post-title {
    font-family: var(--font-serif);
    font-size: 36px;
    font-weight: 400;
    color: var(--color-text-on-dark);
    line-height: 1.3;
    margin-bottom: 16px;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.post-meta { font-size: 14px; color: var(--color-text-on-dark-muted); }

.post-feature-image {
    max-width: var(--content-width);
    margin: -32px auto 0;
    padding: 0 24px;
}

.post-feature-image img { border-radius: 10px; width: 100%; }

/* --- Learn Bitcoin: Subscribe CTA Inline --- */
.subscribe-cta-inline {
    text-align: center;
    margin: 32px 0 48px;
}

/* --- Learn Bitcoin: Benefits --- */
.learn-benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 32px 0;
}

.learn-benefit-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 28px 24px;
}

.learn-benefit-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--color-text);
}

.learn-benefit-card p {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* --- Subscribe Button (larger inline version) --- */
.btn-lg {
    padding: 16px 40px;
    font-size: 16px;
}

/* --- Learn Bitcoin: Member Content --- */
.member-content { margin-top: 32px; }

.member-resource {
    background: #f5ede0;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 16px;
}

.member-resource h3 { font-size: 16px; font-weight: 500; margin: 0 0 8px; }
.member-resource p { font-size: 14px; color: var(--color-text-muted); line-height: 1.6; margin: 0; }

/* --- Support Page --- */
.support-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 720px;
    margin: 0 auto;
}

.support-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 32px 24px;
    text-align: center;
}

.support-card-title {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 20px;
}

.support-qr {
    margin-bottom: 16px;
}

.support-qr img {
    margin: 0 auto;
    border-radius: 8px;
}

.support-address {
    font-size: 11px;
    color: var(--color-text-muted);
    word-break: break-all;
    margin-bottom: 16px;
    font-family: monospace;
    line-height: 1.5;
}

.support-card-desc {
    font-size: 15px;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* --- Contact Page --- */
.contact-inner {
    max-width: 640px;
    margin: 0 auto;
}

.contact-block {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 32px;
    margin-bottom: 24px;
    text-align: center;
}

.contact-heading {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 12px;
}

.contact-text {
    font-size: 15px;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Membership CTA / Signup --- */
.cta-section {
    background: var(--color-dark);
    text-align: center;
    padding: 56px 24px;
}

.cta-title {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 400;
    color: var(--color-text-on-dark);
    margin-bottom: 12px;
}

.cta-desc {
    font-size: 15px;
    color: var(--color-text-on-dark-muted);
    margin-bottom: 28px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 40px 0;
    font-size: 14px;
    color: var(--color-text-muted);
}

.pagination a { color: var(--color-amber-dark); font-weight: 500; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .site-nav { display: none; }
    .nav-toggle { display: flex; }

    body.nav-open .site-nav {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--color-dark);
        padding: 16px 24px 24px;
        gap: 16px;
        border-top: 1px solid #333;
    }

    body.nav-open .site-nav ul.nav {
        flex-direction: column;
        gap: 16px;
    }

    .hero-image img { height: 300px; }
    .hero-content { padding: 32px 24px; }
    .hero-title { font-size: 24px; }
    .hero-sub { font-size: 15px; }

    .card-grid,
    .post-feed {
        grid-template-columns: 1fr;
    }

    .learn-benefits {
        grid-template-columns: 1fr;
    }

    .support-grid {
        grid-template-columns: 1fr;
    }

    .page-header { padding: 40px 24px; }
    .page-header-title { font-size: 26px; }
    .post-title { font-size: 28px; }

    .footer-top { flex-direction: column; gap: 24px; }
    .footer-links { flex-wrap: wrap; }
    .footer-contact { text-align: left; }
    .footer-social { justify-content: flex-start; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 22px; }
    .btn { width: 100%; max-width: 280px; }
    .content-body { font-size: 16px; }
}

/* --- Farm Linkout Card --- */
.farm-linkout {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 32px;
    text-align: center;
    max-width: var(--content-width);
    margin: 0 auto;
}

.farm-linkout-title {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 8px;
}

.farm-linkout-desc {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* --- My Story: floated photo --- */
.my-story-photo {
    float: right;
    width: 45%;
    margin: 0 0 24px 32px;
    shape-outside: margin-box;
}

.my-story-photo img {
    border-radius: 12px;
    width: 100%;
    height: auto;
    display: block;
}

.my-story-photo figcaption {
    font-size: 13px;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: 8px;
    font-style: italic;
}

.my-story-body::after {
    content: "";
    display: table;
    clear: both;
}

@media (max-width: 600px) {
    .my-story-photo {
        float: none;
        width: 60%;
        margin: 0 auto 24px;
    }
}

/* --- Farm Carousel --- */
.farm-carousel {
    position: relative;
    max-width: var(--content-width);
    margin: 40px auto;
    overflow: hidden;
    border-radius: 12px;
}

.farm-carousel-track {
    display: flex;
    transition: transform 0.4s ease;
}

.farm-carousel-slide {
    min-width: 100%;
    flex-shrink: 0;
}

.farm-carousel-slide img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    display: block;
}

.farm-carousel-prev,
.farm-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    font-size: 32px;
    line-height: 1;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
    z-index: 2;
}

.farm-carousel-prev:hover,
.farm-carousel-next:hover {
    background: rgba(0, 0, 0, 0.75);
}

.farm-carousel-prev { left: 12px; }
.farm-carousel-next { right: 12px; }

.farm-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px 0;
    background: var(--color-bg);
}

.farm-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: var(--color-border);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}

.farm-carousel-dot.active {
    background: var(--color-primary);
}

@media (max-width: 600px) {
    .farm-carousel-slide img {
        height: 280px;
    }
    .farm-carousel-prev,
    .farm-carousel-next {
        font-size: 24px;
        padding: 8px 12px;
    }
}
