/* =============================================
   ARTISANS ESSENTIALS — The Digital Monograph
   Custom Ghost Theme Stylesheet
   ============================================= */

/* ---- Base ---- */
*, *::before, *::after {
    box-sizing: border-box;
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

body {
    font-family: 'Public Sans', sans-serif;
    background-color: #fffcf7;
    color: #373831;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: #fffcf7; }
::-webkit-scrollbar-thumb { background: #babab0; }

/* ---- Mobile Nav ---- */
@media (max-width: 768px) {
    #side-nav {
        transform: translateX(-100%);
        transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }
    #side-nav.open {
        transform: translateX(0);
    }
}

/* ---- Ghost Article Content ---- */
.gh-content {
    font-family: 'Public Sans', sans-serif;
    font-size: 1.0625rem;
    line-height: 1.85;
    color: #373831;
}

.gh-content > * + * {
    margin-top: 1.75rem;
}

.gh-content p {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: #373831;
    margin-bottom: 0;
}

.gh-content h2 {
    font-family: 'Newsreader', serif;
    font-size: 2.25rem;
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #373831;
    margin-top: 3.5rem;
    margin-bottom: 1.25rem;
}

.gh-content h3 {
    font-family: 'Newsreader', serif;
    font-size: 1.625rem;
    font-weight: 400;
    line-height: 1.2;
    color: #373831;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.gh-content h4 {
    font-family: 'Public Sans', sans-serif;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #373831;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

/* Blockquote — treated as pull quote */
.gh-content blockquote {
    font-family: 'Newsreader', serif;
    font-size: 1.875rem;
    font-style: italic;
    font-weight: 300;
    line-height: 1.35;
    color: #5f5e5e;
    text-align: center;
    border: none;
    padding: 3.5rem 0;
    margin: 3rem 0;
    position: relative;
}

.gh-content blockquote::before {
    content: '';
    display: block;
    width: 1px;
    height: 40px;
    background-color: #935516;
    margin: 0 auto 2rem;
    opacity: 0.4;
}

.gh-content blockquote p {
    font-size: 1.875rem;
    line-height: 1.35;
    color: inherit;
}

/* Links */
.gh-content a {
    color: #935516;
    text-decoration: none;
    border-bottom: 1px solid rgba(147, 85, 22, 0.35);
    transition: border-color 0.3s ease, color 0.3s ease;
}

.gh-content a:hover {
    color: #854909;
    border-color: #935516;
}

/* Images */
.gh-content img {
    width: 100%;
    height: auto;
    display: block;
}

.gh-content figure {
    margin: 3rem 0;
}

.gh-content figure img {
    width: 100%;
}

.gh-content figcaption {
    font-family: 'Public Sans', sans-serif;
    font-size: 0.625rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #818178;
    margin-top: 0.75rem;
    text-align: left;
}

/* Wide / Full images — break out of column */
.gh-content .kg-width-wide {
    margin-left: -6rem;
    margin-right: -6rem;
}

.gh-content .kg-width-full {
    margin-left: calc(50% - 50vw + 8rem);
    margin-right: calc(50% - 50vw + 8rem);
}

/* Lists */
.gh-content ul, .gh-content ol {
    padding-left: 1.5rem;
    color: #373831;
}

.gh-content ul li, .gh-content ol li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
}

.gh-content ul {
    list-style: none;
    padding-left: 0;
}

.gh-content ul li::before {
    content: '—';
    color: #935516;
    margin-right: 0.75rem;
    font-size: 0.875rem;
}

/* Horizontal rule */
.gh-content hr {
    border: none;
    border-top: 1px solid rgba(186, 186, 176, 0.3);
    margin: 4rem 0;
}

/* Drop cap on first paragraph */
.gh-content > p:first-of-type::first-letter {
    font-family: 'Newsreader', serif;
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 0.8;
    float: left;
    padding-right: 0.125rem;
    padding-top: 0.1em;
    color: #935516;
}

/* Code */
.gh-content code {
    font-family: 'Courier New', monospace;
    font-size: 0.875em;
    background-color: #f0eee5;
    padding: 0.15em 0.35em;
    color: #373831;
}

.gh-content pre {
    background-color: #f0eee5;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 2rem 0;
}

.gh-content pre code {
    background: none;
    padding: 0;
    font-size: 0.875rem;
}

/* Ghost card styles */
.gh-content .kg-card {
    margin: 3rem 0;
}

.gh-content .kg-image-card img {
    width: 100%;
}

.gh-content .kg-gallery-card {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 3rem 0;
}

.gh-content .kg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gh-content .kg-embed-card {
    display: flex;
    justify-content: center;
}

/* Bookmark card */
.gh-content .kg-bookmark-card {
    border: 1px solid rgba(186, 186, 176, 0.3);
    padding: 1.25rem;
    margin: 2rem 0;
    text-decoration: none;
    display: block;
    transition: border-color 0.3s ease;
}

.gh-content .kg-bookmark-card:hover {
    border-color: #935516;
}

.gh-content .kg-bookmark-title {
    font-family: 'Newsreader', serif;
    font-size: 1.125rem;
    color: #373831;
    margin-bottom: 0.25rem;
}

.gh-content .kg-bookmark-description {
    font-size: 0.8125rem;
    color: #64655d;
    line-height: 1.5;
}

.gh-content .kg-bookmark-metadata {
    margin-top: 0.75rem;
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #818178;
}

/* ---- Pagination ---- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 3rem 0;
    font-family: 'Public Sans', sans-serif;
    font-size: 0.6875rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #818178;
}

/* ---- Ghost Portal button override ---- */
.gh-portal-triggerbtn {
    font-family: 'Public Sans', sans-serif !important;
    font-size: 0.6875rem !important;
    letter-spacing: 0.15em !important;
    text-transform: uppercase !important;
    border-radius: 0 !important;
    background-color: #5f5e5e !important;
    color: #faf7f6 !important;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .gh-content h2 { font-size: 1.75rem; }
    .gh-content h3 { font-size: 1.375rem; }
    .gh-content blockquote { font-size: 1.375rem; padding: 2rem 0; }
    .gh-content > p:first-of-type::first-letter { font-size: 3.5rem; }
    .gh-content .kg-width-wide { margin-left: 0; margin-right: 0; }
    .gh-content .kg-width-full { margin-left: 0; margin-right: 0; }
}
