/* =========================================================================
   Lithos Consulting — blog theme
   Mirrors the lithos-consulting.ae landing page:
   bg #1C1C1A · fg #FAFAF8 · Cormorant Garamond (display) + Montserrat (body)
   ========================================================================= */

:root {
    --bg:        #1C1C1A;
    --fg:        #FAFAF8;
    --fg-70:     rgba(250, 250, 248, 0.70);
    --fg-55:     rgba(250, 250, 248, 0.55);
    --fg-40:     rgba(250, 250, 248, 0.40);
    --fg-25:     rgba(250, 250, 248, 0.25);
    --fg-15:     rgba(250, 250, 248, 0.15);
    --serif:     'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --sans:      'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --arabic:    'Noto Naskh Arabic', serif;
    --measure:   680px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: var(--sans);
    font-weight: 300;
    font-size: 17px;
    line-height: 1.7;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

::selection { background: rgba(250, 250, 248, 0.18); }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; height: auto; display: block; }

/* ── Shared wrapper ─────────────────────────────────────────────────────── */
.wrapper {
    width: 100%;
    max-width: var(--measure);
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Site header ────────────────────────────────────────────────────────── */
.site-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 72px 20px 0;
    text-align: center;
    animation: fadeIn 1.1s ease both;
}

.site-logo {
    display: block;
    width: 100%;
    max-width: 340px;
    transition: opacity 0.25s ease;
}
.site-logo:hover { opacity: 0.8; }
.site-logo svg { width: 100%; height: auto; }

.site-tagline {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(17px, 2.4vw, 21px);
    letter-spacing: 0.04em;
    color: var(--fg-70);
    margin-top: 6px;
}

.site-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
    margin-top: 26px;
}
.site-nav a {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fg-55);
    padding-bottom: 3px;
    transition: color 0.2s ease;
}
.site-nav a:hover { color: var(--fg); }
.site-nav .nav-current a { color: var(--fg); border-bottom: 1px solid var(--fg-40); }

/* ── Language switcher ──────────────────────────────────────────────────── */
.lang-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--fg-40);
}
.lang-switch a {
    color: var(--fg-55);
    padding-bottom: 2px;
    transition: color 0.2s ease;
}
.lang-switch a:hover { color: var(--fg); }
.lang-switch a.is-active {
    color: var(--fg);
    border-bottom: 1px solid var(--fg-40);
}
.lang-switch .lang-sep { opacity: 0.4; }

/* Empty feed message */
.post-feed-empty {
    padding: 48px 0;
    text-align: center;
    color: var(--fg-40);
    font-size: 14px;
    letter-spacing: 0.04em;
}

/* ── Homepage intro ─────────────────────────────────────────────────────── */
.home-intro {
    text-align: center;
    padding: 8px 0 4px;
    animation: fadeIn 1.2s ease both;
}
.home-intro-kicker {
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--fg-40);
    margin-bottom: 20px;
}
.home-intro-title {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(28px, 5vw, 42px);
    line-height: 1.15;
    letter-spacing: 0.02em;
    color: var(--fg);
    margin-bottom: 20px;
}
.home-intro-lede {
    max-width: 30em;
    margin: 0 auto;
    color: var(--fg-70);
    font-size: 16px;
    line-height: 1.8;
}
.home-intro-divider { margin-top: 40px; margin-bottom: 8px; }

/* ── Divider ────────────────────────────────────────────────────────────── */
.divider {
    width: 60px;
    height: 1px;
    background: var(--fg);
    opacity: 0.25;
    margin: 44px auto 0;
}

/* ── Main ───────────────────────────────────────────────────────────────── */
.site-main {
    flex: 1 0 auto;
    padding: 56px 0 40px;
    animation: fadeIn 1.2s ease both;
}

/* ── Post feed (index) ──────────────────────────────────────────────────── */
.post-feed { display: flex; flex-direction: column; }

.post-card { border-top: 1px solid var(--fg-15); }
.post-card:first-child { border-top: none; }

.post-card-link {
    display: block;
    padding: 40px 0;
    transition: opacity 0.2s ease;
}
.post-card-link:hover { opacity: 0.72; }
.post-card-link:hover .post-card-more { opacity: 1; }

.post-card-meta {
    display: block;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fg-40);
    margin-bottom: 14px;
}

.post-card-title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(26px, 4vw, 34px);
    line-height: 1.2;
    letter-spacing: 0.01em;
    color: var(--fg);
    margin-bottom: 12px;
}

.post-card-excerpt {
    color: var(--fg-70);
    font-size: 15px;
    line-height: 1.75;
    max-width: 46em;
}

.post-card-more {
    display: inline-block;
    margin-top: 18px;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fg-55);
    opacity: 0.75;
    transition: opacity 0.2s ease;
}

/* ── Pagination ─────────────────────────────────────────────────────────── */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--fg-15);
    padding-top: 32px;
    margin-top: 8px;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fg-55);
}
.pagination a { color: var(--fg-70); transition: color 0.2s ease; }
.pagination a:hover { color: var(--fg); }
.pagination .page-number { color: var(--fg-40); }

/* ── Single post ────────────────────────────────────────────────────────── */
.post-header { text-align: center; margin-bottom: 48px; }

.post-kicker {
    display: inline-block;
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--fg-55);
    margin-bottom: 22px;
}

.post-full-title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(34px, 6vw, 54px);
    line-height: 1.12;
    letter-spacing: 0.01em;
    color: var(--fg);
    margin-bottom: 22px;
}

.post-meta {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fg-40);
    display: flex;
    justify-content: center;
    gap: 10px;
}
.post-meta .sep { opacity: 0.6; }

.post-feature-image {
    margin: 0 0 48px;
}
.post-feature-image img { width: 100%; border: 1px solid var(--fg-15); }
.post-feature-image figcaption {
    text-align: center;
    font-size: 12px;
    color: var(--fg-40);
    margin-top: 12px;
    letter-spacing: 0.04em;
}

/* ── Long-form content typography (Ghost editor output) ─────────────────── */
.gh-content { font-size: 17px; line-height: 1.8; color: var(--fg-70); }
.gh-content > * + * { margin-top: 1.5em; }

.gh-content p { color: var(--fg-70); }
.gh-content strong { color: var(--fg); font-weight: 500; }

.gh-content h2, .gh-content h3, .gh-content h4 {
    font-family: var(--serif);
    color: var(--fg);
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.25;
    margin-top: 2em;
}
.gh-content h2 { font-size: 30px; }
.gh-content h3 { font-size: 24px; }
.gh-content h4 { font-size: 20px; }

.gh-content a {
    color: var(--fg);
    border-bottom: 1px solid var(--fg-40);
    padding-bottom: 1px;
    transition: opacity 0.2s ease;
}
.gh-content a:hover { opacity: 0.65; }

.gh-content ul, .gh-content ol { padding-left: 1.4em; color: var(--fg-70); }
.gh-content li + li { margin-top: 0.5em; }

.gh-content blockquote {
    border-left: 1px solid var(--fg-25);
    padding-left: 24px;
    font-family: var(--serif);
    font-size: 22px;
    font-style: italic;
    color: var(--fg);
    line-height: 1.5;
}

.gh-content img,
.gh-content .kg-card { margin-top: 2em; margin-bottom: 2em; }

/* Koenig editor width cards — break out of the reading column */
.gh-content .kg-width-wide {
    position: relative;
    width: 85vw;
    min-width: 100%;
    margin-left: calc(50% - 42.5vw);
    margin-right: calc(50% - 42.5vw);
    max-width: 1040px;
    left: 50%;
    transform: translateX(-50%);
}
.gh-content .kg-width-full {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    max-width: 100vw;
}
.gh-content .kg-width-full img { width: 100%; border: none; }
.gh-content figure img { width: 100%; border: 1px solid var(--fg-15); }
.gh-content figcaption {
    text-align: center;
    font-size: 12px;
    color: var(--fg-40);
    margin-top: 12px;
    letter-spacing: 0.04em;
}

.gh-content hr {
    border: none;
    border-top: 1px solid var(--fg-15);
    margin: 3em auto;
    width: 60px;
}

.gh-content code {
    font-family: 'SF Mono', ui-monospace, 'JetBrains Mono', Menlo, Consolas, monospace;
    font-size: 0.85em;
    background: rgba(250, 250, 248, 0.06);
    border: 1px solid var(--fg-15);
    border-radius: 3px;
    padding: 0.12em 0.4em;
    color: var(--fg);
}
.gh-content pre {
    background: #141412;
    border: 1px solid var(--fg-15);
    border-radius: 4px;
    padding: 20px 22px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
}
.gh-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: #E7E7E2;
}

/* Arabic text inside content or tags */
[dir="rtl"], .rtl { font-family: var(--arabic); }

/* ── Tags on post ───────────────────────────────────────────────────────── */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    justify-content: center;
    border-top: 1px solid var(--fg-15);
    margin-top: 56px;
    padding-top: 36px;
}
.post-tag-pill {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fg-55);
    border: 1px solid var(--fg-15);
    border-radius: 999px;
    padding: 7px 16px;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.post-tag-pill:hover { color: var(--fg); border-color: var(--fg-40); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-foot {
    flex-shrink: 0;
    border-top: 1px solid var(--fg-15);
    padding: 40px 24px 56px;
    margin-top: 40px;
}
.site-foot-inner {
    max-width: var(--measure);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fg-40);
}
.site-foot-inner a { transition: color 0.2s ease; }
.site-foot-inner a:hover { color: var(--fg); }

/* ── Misc ───────────────────────────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .site-head { padding-top: 52px; }
    .post-card-link { padding: 32px 0; }
    .site-foot-inner { flex-direction: column; text-align: center; }
}
