:root {
    --color-bg: #f6ecdd;
    --color-card: #fffaf2;
    --color-plum: #6d3f52;
    --color-plum-dark: #4a2b3a;
    --color-mauve: #a9748a;
    --color-gold: #d9a962;
    --color-wine: #7a2036;
    --color-ink: #2b1f22;

    --font-display: var(--gh-font-heading, 'Fraunces', Georgia, serif);
    --font-body: var(--gh-font-body, 'Lora', Georgia, serif);
    --font-script: 'Petit Formal Script', cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-ink);
    font-family: var(--font-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.site-header {
    background: linear-gradient(160deg, var(--color-plum-dark), var(--color-plum) 55%, var(--color-mauve));
    color: var(--color-bg);
    padding-bottom: 64px;
}

.site-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 960px;
    padding-top: 24px;
}

.site-logo { text-decoration: none; }
.site-logo img { max-height: 40px; }
.site-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--color-bg);
    letter-spacing: 0.02em;
}

.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav ul {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-nav a {
    color: var(--color-bg);
    text-decoration: none;
    opacity: 0.85;
    font-size: 0.95rem;
    transition: opacity 0.15s ease;
}
.site-nav a:hover { opacity: 1; }

.nav-login {
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    padding: 6px 18px !important;
    opacity: 1 !important;
}
.nav-login:hover {
    background: rgba(255, 255, 255, 0.12);
}

.nav-toggle {
    display: none;
    color: var(--color-bg);
    text-decoration: none;
    font-size: 1.5rem;
}

.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 56px;
    max-width: 960px;
    margin: 48px auto 0;
    padding-bottom: 80px;
}
.hero-text {
    flex: 1 1 380px;
    max-width: 460px;
}
.hero-script {
    font-family: var(--font-script);
    font-size: 1.7rem;
    color: var(--color-gold);
    margin: 0 0 4px;
}
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 700;
    margin: 0 0 14px;
    line-height: 1.1;
}
.hero-desc {
    font-size: 1.05rem;
    opacity: 0.9;
    margin: 0 0 28px;
}

.hero-frame {
    flex: 0 0 auto;
    width: 260px;
    margin-bottom: -140px;
    transform: rotate(3deg);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(43, 31, 34, 0.4), 0 0 0 10px rgba(255, 250, 242, 0.9);
}
.hero-frame img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    object-position: top center;
    display: block;
}

@media (max-width: 760px) {
    .hero {
        flex-direction: column;
        text-align: center;
        gap: 32px;
        padding-bottom: 60px;
    }
    .hero-text { max-width: 460px; }
    .hero-frame {
        width: 200px;
        margin-bottom: -80px;
    }
    .hero-frame img { height: 280px; }
}

.btn-subscribe {
    display: inline-block;
    background: var(--color-gold);
    color: var(--color-ink);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 13px 32px;
    border-radius: 999px;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-subscribe:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

/* Main */
.site-main {
    max-width: 960px;
    margin: -40px auto 0;
    padding: 0 24px 60px;
}

.archive-header { text-align: center; padding-top: 40px; }
.archive-title { font-family: var(--font-display); font-size: 2.2rem; margin: 6px 0 10px; }
.archive-desc { opacity: 0.75; max-width: 560px; margin: 0 auto 30px; }
.author-avatar { width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 16px; }

/* Decorative icons */
.icon-deco {
    width: 26px;
    height: 26px;
    color: var(--color-gold);
    vertical-align: -6px;
    margin-right: 6px;
}

/* Manifesto torn-note section */
.manifesto {
    display: flex;
    justify-content: center;
    padding: 10px 24px 70px;
}
.manifesto-note {
    position: relative;
    max-width: 460px;
    background: var(--color-card);
    padding: 46px 40px 34px;
    transform: rotate(-1.5deg);
    box-shadow: 0 16px 40px rgba(74, 43, 58, 0.18);
    clip-path: polygon(
        0% 3%, 6% 0%, 12% 2.5%, 18% 0%, 24% 3%, 30% 0.5%, 36% 3%, 42% 0%, 48% 2.5%, 54% 0%,
        60% 3%, 66% 0.5%, 72% 3%, 78% 0%, 84% 2.5%, 90% 0%, 96% 3%, 100% 0.5%,
        100% 100%, 0% 100%
    );
}
.manifesto-tape {
    position: absolute;
    top: -14px;
    left: 40px;
    width: 70px;
    height: 26px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transform: rotate(-4deg);
}
.manifesto-kiss {
    display: block;
    font-size: 1.6rem;
    filter: grayscale(0.15) sepia(0.4) hue-rotate(300deg) saturate(2);
    margin-bottom: 6px;
}
.manifesto-quote {
    font-family: var(--font-script);
    font-size: 1.9rem;
    color: var(--color-wine);
    margin: 0 0 10px;
    line-height: 1.3;
}
.manifesto-sign {
    font-family: 'Caveat', var(--font-script);
    font-size: 1.3rem;
    opacity: 0.7;
    margin: 0;
}

/* About teaser */
.about-teaser {
    display: flex;
    align-items: center;
    gap: 48px;
    padding-bottom: 80px;
}
.about-teaser-image {
    flex: 0 0 220px;
    border-radius: 50%;
    overflow: hidden;
    width: 220px;
    height: 220px;
    box-shadow: 0 20px 40px rgba(74, 43, 58, 0.2), 0 0 0 8px var(--color-card);
}
.about-teaser-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}
.about-teaser-text { flex: 1 1 auto; }
.about-teaser-text h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin: 4px 0 10px;
}
.about-teaser-text p { margin: 0 0 14px; opacity: 0.85; }
.draft-flag {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-wine);
    background: rgba(122, 32, 54, 0.08);
    padding: 4px 10px;
    border-radius: 999px;
    opacity: 1 !important;
}
.link-more {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--color-wine);
    text-decoration: none;
}
.link-more:hover { text-decoration: underline; }

@media (max-width: 700px) {
    .about-teaser { flex-direction: column; text-align: center; }
    .about-teaser-image { flex-basis: auto; }
}

/* Feed section heading */
.feed-section { padding-bottom: 20px; }
.section-heading {
    font-family: var(--font-display);
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 10px;
}

/* Subscribe CTA with wax seal */
.subscribe-cta {
    background: linear-gradient(160deg, var(--color-plum-dark), var(--color-plum) 60%, var(--color-mauve));
    color: var(--color-bg);
    margin-top: 60px;
    padding: 70px 24px;
}
.subscribe-cta-inner { text-align: center; max-width: 560px; }
.wax-seal {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, var(--color-wine), #4a1120 75%);
    border: 3px solid var(--color-gold);
    color: var(--color-gold);
    font-family: var(--font-script);
    font-size: 1.05rem;
    line-height: 1.15;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0 auto 24px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}
.subscribe-cta h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin: 0 0 12px;
}
.subscribe-cta p { opacity: 0.85; margin: 0 0 28px; }

.post-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 24px;
}

.post-card {
    background: var(--color-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(74, 43, 58, 0.14);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(74, 43, 58, 0.2);
}
.post-card-link { text-decoration: none; display: block; color: inherit; }
.post-card-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: var(--color-mauve);
}
.post-card-content { padding: 22px; }
.post-card-tag {
    font-family: var(--font-script);
    color: var(--color-wine);
    font-size: 1.05rem;
}
.post-card-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin: 6px 0 8px;
    line-height: 1.25;
}
.post-card-excerpt { font-size: 0.95rem; opacity: 0.8; margin: 0 0 14px; }
.post-card-meta {
    font-size: 0.78rem;
    opacity: 0.6;
    display: flex;
    justify-content: space-between;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.post-card-lock { color: var(--color-wine); font-weight: 600; opacity: 1; }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 48px;
    font-family: var(--font-display);
}
.pagination a { text-decoration: none; color: var(--color-wine); font-weight: 600; }

/* Single post */
.post-full-header { text-align: center; padding-top: 56px; }
.post-full-tag { font-family: var(--font-script); color: var(--color-wine); font-size: 1.3rem; }
.post-full-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.1rem);
    margin: 10px 0;
    line-height: 1.15;
}
.post-full-meta { opacity: 0.6; font-size: 0.9rem; }

.post-full-image {
    height: 380px;
    background-size: cover;
    background-position: center;
    margin: 36px auto;
    border-radius: 20px;
    max-width: 960px;
}

.post-full-content { font-size: 1.15rem; }
.post-full-content h2, .post-full-content h3 { font-family: var(--font-display); margin-top: 2em; }
.post-full-content a { color: var(--color-wine); }
.post-full-content blockquote {
    border-left: 4px solid var(--color-gold);
    margin: 1.6em 0;
    padding-left: 20px;
    font-style: italic;
    color: var(--color-plum-dark);
}
.post-full-content figure { margin: 2em 0; }
.post-full-content figcaption { font-size: 0.85rem; opacity: 0.65; text-align: center; margin-top: 8px; }

.post-full-content .kg-width-wide {
    margin-left: calc(50% - 480px);
    margin-right: calc(50% - 480px);
    max-width: none;
}
.post-full-content .kg-width-full {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
}
@media (max-width: 1000px) {
    .post-full-content .kg-width-wide,
    .post-full-content .kg-width-full {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }
}

.post-paywall {
    text-align: center;
    background: linear-gradient(180deg, rgba(217, 169, 98, 0.1), rgba(122, 32, 54, 0.06));
    border: 1px solid rgba(122, 32, 54, 0.15);
    border-radius: 22px;
    padding: 52px 32px;
    margin: 48px auto;
    max-width: 640px;
}
.paywall-script { font-family: var(--font-script); font-size: 1.9rem; color: var(--color-wine); margin: 0; }
.post-paywall h3 { font-family: var(--font-display); font-size: 1.6rem; margin: 8px 0 14px; }
.post-paywall p:not(.paywall-script) { opacity: 0.75; margin-bottom: 24px; }

.error-page { text-align: center; padding: 100px 24px; }
.error-code { font-family: var(--font-display); font-size: 5rem; margin: 0; color: var(--color-wine); }
.error-message { opacity: 0.7; margin-bottom: 32px; }

/* Footer */
.site-footer {
    background: var(--color-ink);
    color: var(--color-bg);
    text-align: center;
    padding: 48px 24px;
    margin-top: 60px;
}
.footer-script {
    font-family: var(--font-script);
    color: var(--color-gold);
    font-size: 1.8rem;
    margin: 0 0 10px;
}
.footer-copy { opacity: 0.6; font-size: 0.85rem; margin: 0 0 16px; }
.footer-nav a {
    color: var(--color-bg);
    opacity: 0.7;
    text-decoration: none;
    margin: 0 10px;
    font-size: 0.9rem;
}
.footer-nav a:hover { opacity: 1; }

@media (max-width: 640px) {
    .site-nav { display: none; }
    .site-nav.is-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        right: 24px;
        background: var(--color-plum-dark);
        padding: 16px 24px;
        border-radius: 12px;
        z-index: 20;
    }
    .nav-toggle { display: block; }
}
