/* RPJ Studio theme. Tweak the variables first. */
:root {
    --ink: #1E1620;
    --plum: #3A2437;
    --paper: #F6F1F2;
    --white: #FFFFFF;
    --rose: #E8A9B4;
    --sage: #A3B899;
    --sage-deep: #4F6648;
    --butter: #F2DDA4;
    --text: #231A25;
    --muted: #4A3B4C;
    --soft: #E4D8E0;
    --accent: var(--rose);
    --font-head: 'Bricolage Grotesque', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --font-hand: 'Caveat', cursive;
    --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--font-body); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:hover { opacity: .8; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.1; margin: 0; letter-spacing: -1px; }
p { margin: 0; }
main { overflow: hidden; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-body); font-weight: 700; font-size: 17px; line-height: 1; padding: 16px 28px; border-radius: 999px; border: 2px solid transparent; text-decoration: none; cursor: pointer; }
.btn-rose { background: var(--rose); color: var(--ink); padding: 12px 20px; font-size: 16px; }
.btn-sage { background: var(--sage); color: var(--ink); box-shadow: 4px 4px 0 var(--rose); }
.btn-butter { background: var(--butter); color: var(--ink); box-shadow: 4px 4px 0 var(--sage); }
.btn-ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-ghost { border-color: var(--paper); color: var(--paper); }
.btn-ghost-dark { border-color: var(--ink); color: var(--ink); }

/* Handwriting kicker */
.hand { font-family: var(--font-hand); font-size: 26px; line-height: 1.1; }
.hand-sage { color: var(--sage-deep); }
.hand-butter { color: var(--butter); display: inline-block; transform: rotate(-2deg); }

/* Nav and footer */
.nav { background: var(--ink); color: var(--paper); padding: 20px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.logo { font-family: var(--font-head); font-weight: 800; font-size: 24px; letter-spacing: -.5px; text-decoration: none; color: var(--paper); }
.logo span { color: var(--rose); }
.nav-links { flex: 1 1 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 28px; font-weight: 500; }
.nav-link { text-decoration: none; padding: 10px 0; color: var(--paper); }
.nav-link:hover, .nav-current { color: var(--rose); }
.footer { background: var(--ink); color: var(--soft); padding: 40px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; font-size: 15px; }
.footer .logo { font-size: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { text-decoration: none; padding: 8px 0; }

/* Hero */
.hero { background: var(--ink); color: var(--paper); padding: 48px 32px 96px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 48px; }
.hero-copy { flex: 1 1 420px; max-width: 560px; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.hero h1 { font-weight: 800; font-size: clamp(40px, 7vw, 64px); line-height: 1.02; letter-spacing: -2px; }
.hero p { font-size: 19px; color: var(--soft); }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 8px; }

.collage { flex: 1 1 420px; max-width: 560px; min-height: 440px; position: relative; }
.page { position: absolute; border-radius: 6px; padding: 24px; box-shadow: 8px 8px 0 var(--plum); }
.page-left { left: 4%; top: 40px; width: 50%; height: 340px; background: var(--paper); transform: rotate(-4deg); color: var(--text); }
.page-right { right: 2%; top: 0; width: 52%; height: 360px; background: var(--rose); transform: rotate(3deg); color: var(--ink); }
.page-title { font-family: var(--font-hand); font-size: 28px; line-height: 1; }
.rule { height: 2px; background: var(--text); opacity: .7; margin: 10px 0 14px; }
.line { height: 8px; background: #D9CBD3; border-radius: 4px; margin-bottom: 10px; }
.l85 { width: 85%; }
.l70 { width: 70%; margin-bottom: 18px; }
.map-title { font-family: var(--font-head); font-weight: 800; font-size: 22px; }
.map-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.map-grid span { width: calc(50% - 5px); height: 70px; background: var(--paper); border-radius: 10px; }
.map-grid .m-sage { background: var(--sage); }
.map-grid .m-butter { background: var(--butter); }
.roll { margin-top: 16px; display: inline-block; background: var(--ink); color: var(--butter); font-weight: 700; font-size: 14px; padding: 6px 12px; border-radius: 999px; }
.tape { position: absolute; width: 110px; height: 30px; opacity: .92; }
.tape-butter { background: var(--butter); }
.tape-sage { background: var(--sage); }
.tape-a { left: 18%; top: 20px; transform: rotate(-8deg); }
.tape-b { right: 14%; top: -14px; transform: rotate(6deg); }
.note { position: absolute; left: 30%; bottom: 20px; background: var(--butter); color: var(--ink); font-family: var(--font-hand); font-size: 26px; padding: 8px 18px; transform: rotate(-3deg); border-radius: 4px; }

/* Torn paper edge under the hero */
.torn { height: 36px; margin-top: -35px; background: var(--paper); position: relative; clip-path: polygon(0% 100%, 0% 40%, 4% 70%, 9% 30%, 14% 65%, 20% 25%, 26% 70%, 32% 35%, 38% 75%, 44% 30%, 50% 70%, 56% 35%, 62% 75%, 68% 30%, 74% 70%, 80% 35%, 86% 75%, 92% 30%, 97% 65%, 100% 35%, 100% 100%); }

/* Sections and cards */
.section, .listing { max-width: var(--max); margin: 0 auto; padding: 48px 32px 96px; }
.section-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 40px; }
.section-head { margin-bottom: 40px; }
.section-row .section-head { margin-bottom: 0; }
.section-head h1, .section-head h2 { font-weight: 800; font-size: clamp(32px, 5vw, 44px); }
.section-desc { margin-top: 12px; color: var(--muted); max-width: 600px; }
.link-underline { font-weight: 700; text-decoration: underline; padding: 12px 0; }
.empty { color: var(--muted); }

.cards { display: flex; flex-wrap: wrap; gap: 40px; }
.card { flex: 1 1 280px; max-width: 380px; background: var(--white); border: 2px solid var(--ink); border-radius: 18px; box-shadow: 8px 8px 0 var(--accent); overflow: hidden; display: flex; flex-direction: column; }
.card-art { display: block; height: 180px; background: var(--accent); position: relative; text-decoration: none; }
.card-art img { width: 100%; height: 100%; object-fit: cover; }
.sticker { position: absolute; left: 16px; bottom: 16px; background: var(--ink); color: var(--paper); font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 999px; }
.card-body { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.card-tag { font-weight: 700; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--sage-deep); text-decoration: none; }
.card-title { font-weight: 700; font-size: 26px; letter-spacing: -.5px; }
.card-title a { text-decoration: none; }
.card-excerpt { color: var(--muted); line-height: 1.55; }
.card-more { font-weight: 700; padding: 8px 0; text-decoration: none; }

/* Community band */
.community { background: var(--ink); color: var(--paper); padding: 96px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 56px; }
.community-copy { flex: 1 1 380px; max-width: 480px; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.community h2 { font-weight: 800; font-size: clamp(32px, 5vw, 44px); }
.community p { font-size: 18px; color: var(--soft); }
.polaroids { flex: 1 1 380px; max-width: 560px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; padding: 16px; }
.polaroid { width: 200px; background: var(--paper); padding: 12px 12px 16px; box-shadow: 6px 6px 0 var(--plum); color: var(--text); }
.photo { height: 200px; }
.c-sage { background: var(--sage); } .c-rose { background: var(--rose); } .c-butter { background: var(--butter); }
.caption { font-family: var(--font-hand); font-size: 24px; padding-top: 8px; }
.p1 { transform: rotate(-4deg); } .p2 { transform: rotate(3deg) translateY(24px); } .p3 { transform: rotate(-2deg); }

/* Tutorial tiles */
.tiles { display: flex; flex-wrap: wrap; gap: 24px; }
.tile { flex: 1 1 260px; text-decoration: none; border: 2px solid var(--ink); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 10px; background: #F7E6E8; }
.tile-1 { background: #E5ECE1; }
.tile-2 { background: #FAF0D2; }
.tile-title { font-family: var(--font-head); font-weight: 700; font-size: 24px; letter-spacing: -.5px; }
.tile-text { color: var(--muted); }
.tile-more { font-weight: 700; }

/* Signup */
.signup-wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px 96px; }
.signup { background: var(--rose); border: 2px solid var(--ink); border-radius: 24px; box-shadow: 10px 10px 0 var(--ink); padding: 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 32px; position: relative; color: var(--ink); }
.signup .tape { top: -16px; left: 48px; transform: rotate(-4deg); }
.signup-copy { flex: 1 1 320px; display: flex; flex-direction: column; gap: 12px; }
.signup h2 { font-weight: 800; font-size: 36px; }
.signup-form { flex: 1 1 320px; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.field { flex: 1 1 220px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: 14px; }
.field input { height: 52px; border: 2px solid var(--ink); border-radius: 999px; padding: 0 20px; font-size: 16px; font-family: var(--font-body); background: var(--paper); color: var(--text); }
.signup-form .btn { height: 52px; padding: 0 28px; font-size: 16px; }
.btn-loading, .form-msg { display: none; }
.signup-form.loading .btn-label { display: none; }
.signup-form.loading .btn-loading { display: inline; }
.signup-form.success .form-success, .signup-form.error .form-error { display: block; width: 100%; font-weight: 700; }

/* Posts and pages */
.article { max-width: 760px; margin: 0 auto; padding: 56px 24px 72px; }
.article-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; align-items: flex-start; }
.article-title { font-weight: 800; font-size: clamp(34px, 6vw, 52px); letter-spacing: -1.5px; }
.article-excerpt { font-size: 20px; color: var(--muted); }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 15px; color: var(--muted); }
.article-image { margin: 0 0 40px; }
.article-image img { width: 100%; border: 2px solid var(--ink); border-radius: 18px; box-shadow: 8px 8px 0 var(--accent); }
.article-image figcaption { font-size: 14px; color: var(--muted); padding-top: 12px; text-align: center; }
.gh-content > * + * { margin-top: 1.4em; }
.gh-content h2 { font-size: 34px; margin-top: 2em; }
.gh-content h3 { font-size: 26px; margin-top: 1.8em; }
.gh-content a { color: var(--sage-deep); font-weight: 500; }
.gh-content ul, .gh-content ol { padding-left: 1.4em; }
.gh-content li + li { margin-top: .4em; }
.gh-content blockquote { margin-left: 0; padding: 4px 0 4px 24px; border-left: 6px solid var(--accent); font-size: 1.1em; }
.gh-content hr { border: 0; border-top: 2px dashed var(--ink); opacity: .4; margin: 2.4em 0; }
.gh-content img { border-radius: 12px; }
.gh-content figure { margin: 0; }
.gh-content figcaption { font-size: 14px; color: var(--muted); padding-top: 8px; text-align: center; }
.gh-content pre { background: var(--ink); color: var(--paper); padding: 20px; border-radius: 12px; overflow-x: auto; }
.gh-content code { font-size: .92em; }

/* Ghost editor cards: wide and full width images */
.kg-width-wide { position: relative; width: min(1100px, 92vw); left: 50%; transform: translateX(-50%); max-width: none; }
.kg-width-full { position: relative; width: 100vw; left: 50%; transform: translateX(-50%); max-width: none; }
.kg-width-full img { width: 100%; }
.kg-image-card img, .kg-gallery-card img { margin: 0 auto; }
.kg-gallery-container { display: flex; flex-direction: column; gap: 12px; }
.kg-gallery-row { display: flex; gap: 12px; }
.kg-gallery-image { flex: 1 1 0; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; }
.kg-bookmark-card a { display: flex; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; text-decoration: none; background: var(--white); }
.kg-bookmark-content { padding: 16px; flex: 1; }
.kg-bookmark-title { font-weight: 700; }
.kg-bookmark-description, .kg-bookmark-metadata { font-size: 14px; color: var(--muted); }
.kg-bookmark-thumbnail { width: 160px; position: relative; }
.kg-bookmark-thumbnail img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.kg-callout-card { display: flex; gap: 12px; padding: 20px; border-radius: 12px; background: var(--butter); }
.kg-toggle-card { border: 2px solid var(--ink); border-radius: 12px; padding: 16px; }

/* Comments */
.comments { margin-top: 64px; padding-top: 32px; border-top: 2px dashed var(--ink); }
.comments h2 { font-size: 30px; margin-bottom: 20px; }

/* Pagination */
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; margin-top: 56px; }
.pagination .btn { padding: 12px 22px; font-size: 16px; }
.pagination-count { font-weight: 500; color: var(--muted); }

/* Small screens */
@media (max-width: 640px) {
    .nav, .footer { padding: 16px 20px; }
    .hero { padding: 32px 20px 72px; }
    .section, .listing { padding: 40px 20px 72px; }
    .community { padding: 72px 20px; }
    .signup-wrap { padding: 0 20px 72px; }
    .signup { padding: 32px 24px; }
    .collage { min-height: 400px; }
    .kg-bookmark-card a { flex-direction: column; }
    .kg-bookmark-thumbnail { width: 100%; height: 160px; }
}
