/* ============================================================
   Salt & Myth — a newsletter-first Ghost theme
   The secret history of food and drink.
   ============================================================ */

:root {
    --paper: #faf7f0;
    --paper-deep: #f3eee2;
    --ink: #1d1a15;
    --ink-soft: #4a443a;
    --muted: #8a8172;
    --line: #e4dccb;
    --card: #ffffff;
    --accent: #b3402a;
    --accent-ink: #ffffff;
    --dark: #171310;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --radius: 10px;
    --wrap: 1140px;
    --wrap-narrow: 720px;
}

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

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; margin: 0 0 0.5em; font-weight: 700; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: var(--wrap-narrow); margin: 0 auto; padding: 0 24px; }

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Kicker / section labels ---------- */
.kicker {
    display: inline-block;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 12px;
}
.kicker-light { color: #e8b4a4; }

.section-title {
    font-size: 13px;
    font-family: var(--sans);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-sm { padding: 8px 18px; font-size: 14px; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border: 1px solid rgba(250, 247, 240, 0.28);
    border-radius: 50%;
    background: transparent;
    color: var(--paper);
    cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.header-actions .btn-ghost { color: var(--paper); }

/* ---------- Reading progress ---------- */
.progress-bar {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0;
    background: var(--accent);
    z-index: 100;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--header-bg, var(--dark));
    border-bottom: 1px solid rgba(250, 247, 240, 0.12);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--paper); }
.brand:hover { text-decoration: none; }
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px; height: 58px;
    background: var(--dark);
    color: var(--paper);
    font-family: var(--serif);
    font-weight: 700;
    font-size: 23px;
    border-radius: 12px;
    letter-spacing: 0.02em;
}
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 22px; }
.brand-logo { height: 58px; width: auto; }

.site-nav { margin-left: auto; }
.site-nav ul {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-nav a {
    display: block;
    padding: 8px 14px;
    color: rgba(250, 247, 240, 0.8);
    font-size: 15px;
    font-weight: 600;
    border-radius: 999px;
}
.site-nav a:hover { color: var(--paper); background: rgba(250, 247, 240, 0.1); text-decoration: none; }
.site-nav li.nav-current a { color: var(--paper); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.site-nav + .header-actions { margin-left: 0; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
    background: var(--dark);
    color: var(--paper);
    padding: 88px 0 96px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(179, 64, 42, 0.28), transparent 70%);
    pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 720px; }
.hero-title {
    font-size: clamp(34px, 5vw, 56px);
    margin: 0 0 16px;
    letter-spacing: -0.01em;
}
.hero-sub { font-size: 18px; color: #cfc6b4; max-width: 560px; margin: 0 auto 32px; }
.hero-form { max-width: 480px; margin: 0 auto; }
.hero-form .subscribe-email { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.2); color: var(--paper); }
.hero-form .subscribe-email::placeholder { color: #a89e88; }
.hero-note { margin: 16px 0 0; font-size: 13px; color: #a89e88; }

/* ---------- Subscribe forms ---------- */
.subscribe-form { display: flex; gap: 10px; }
.subscribe-email {
    flex: 1;
    font-size: 15px;
    padding: 12px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--card);
    color: var(--ink);
    min-width: 0;
}
.subscribe-email:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form-message { font-size: 14px; color: var(--accent); margin: 10px 0 0; min-height: 1.4em; }

.subscribe-box {
    background: var(--dark);
    color: var(--paper);
    border-radius: var(--radius);
    padding: 48px 40px;
    margin: 64px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.subscribe-box::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 60% at 50% 100%, rgba(179, 64, 42, 0.25), transparent 70%);
    pointer-events: none;
}
.subscribe-box-inner { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; }
.subscribe-title { font-size: 28px; margin: 0 0 10px; }
.subscribe-text { color: #cfc6b4; margin: 0 0 24px; }
.subscribe-box .subscribe-form { max-width: 440px; margin: 0 auto; }

/* ---------- Home sections ---------- */
.latest { padding: 56px 0 8px; }

.feature-post {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 40px;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.feature-image img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; }
.feature-body { padding: 40px 40px 40px 0; }
.feature-title { font-size: clamp(26px, 3.4vw, 40px); margin: 0 0 12px; }
.feature-title a { color: var(--ink); }
.feature-title a:hover { color: var(--accent); text-decoration: none; }
.feature-excerpt { color: var(--ink-soft); font-size: 17px; margin: 0 0 16px; }
.feature-body .btn { margin-top: 20px; }

.archive { padding: 56px 0; }
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* ---------- Post cards ---------- */
.post-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(29, 26, 21, 0.1); }
.post-card-image { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.post-card:hover .post-card-image img { transform: scale(1.04); }
.post-card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.post-card-title { font-size: 21px; margin: 0 0 8px; }
.post-card-title a { color: var(--ink); }
.post-card-title a:hover { color: var(--accent); text-decoration: none; }
.post-card-excerpt { color: var(--ink-soft); font-size: 15px; margin: 0 0 14px; flex: 1; }
.post-card-meta { font-size: 13px; color: var(--muted); }
.meta-dot { margin: 0 6px; }

/* ---------- Topics ---------- */
.topics { padding: 8px 0 72px; }
.topic-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.topic-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--card);
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 600;
}
.topic-chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.topic-count {
    font-size: 12px;
    background: var(--paper-deep);
    border-radius: 999px;
    padding: 1px 8px;
    color: var(--muted);
}

/* ---------- List pages ---------- */
.list-page { padding: 56px 0 72px; }
.list-header { margin-bottom: 36px; max-width: 640px; }
.list-title { font-size: clamp(30px, 4vw, 44px); margin: 0 0 10px; }
.list-desc { color: var(--ink-soft); font-size: 17px; margin: 0 0 8px; }
.list-count { color: var(--muted); font-size: 14px; margin: 0; }
.author-header { display: flex; gap: 20px; align-items: flex-start; }
.author-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.author-avatar-lg { width: 84px; height: 84px; }

/* ---------- Issue (single post) ---------- */
.issue { padding: 56px 0 0; }
.issue-header { text-align: left; margin-bottom: 32px; }
.issue-title { font-size: clamp(32px, 4.6vw, 52px); letter-spacing: -0.015em; margin: 0 0 16px; }
.standfirst { font-size: 20px; color: var(--ink-soft); font-family: var(--serif); font-style: italic; margin: 0 0 24px; }

.byline { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; }
.byline-author { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 15px; }
.byline-author img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.byline-meta { color: var(--muted); font-size: 14px; }

.issue-feature { margin: 0 auto 48px; }
.issue-feature img { border-radius: var(--radius); width: 100%; }
.issue-feature figcaption { text-align: center; font-size: 13px; color: var(--muted); margin-top: 10px; }

/* Article body typography */
.issue-body { font-size: 18px; line-height: 1.75; color: var(--ink); }
.issue-body > p:first-of-type::first-letter {
    font-family: var(--serif);
    font-size: 3.4em;
    float: left;
    line-height: 0.9;
    padding-right: 10px;
    padding-top: 4px;
    color: var(--accent);
    font-weight: 700;
}
.issue-body p { margin: 0 0 1.5em; }
.issue-body h2 { font-size: 30px; margin: 2.2em 0 0.7em; letter-spacing: -0.01em; }
.issue-body h3 { font-size: 23px; margin: 1.8em 0 0.6em; }
.issue-body a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.issue-body blockquote {
    margin: 2em 0;
    padding: 4px 0 4px 24px;
    border-left: 3px solid var(--accent);
    font-family: var(--serif);
    font-size: 22px;
    font-style: italic;
    color: var(--ink-soft);
}
.issue-body ul, .issue-body ol { margin: 0 0 1.5em; padding-left: 1.4em; }
.issue-body li { margin-bottom: 0.5em; }
.issue-body hr { border: 0; border-top: 1px solid var(--line); margin: 3em auto; max-width: 220px; }
.issue-body table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; font-size: 15px; }
.issue-body th, .issue-body td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.issue-body th { font-family: var(--sans); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

/* Chef's note callout — use an HTML card in the editor:
   <aside class="chef-note"><h4>Chef's note</h4><p>...</p></aside> */
.chef-note {
    background: var(--paper-deep);
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 24px 28px;
    margin: 2.5em 0;
}
.chef-note h4 {
    font-family: var(--sans);
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 10px;
}
.chef-note p { margin: 0 0 1em; font-size: 17px; }
.chef-note p:last-child { margin-bottom: 0; }

/* Verdict box — <aside class="verdict"><h4>The verdict</h4>... */
.verdict {
    background: var(--dark);
    color: var(--paper);
    border-radius: var(--radius);
    padding: 28px 30px;
    margin: 2.5em 0;
}
.verdict h4 {
    font-family: var(--sans);
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #e8b4a4;
    margin: 0 0 10px;
}
.verdict p { margin: 0 0 1em; }
.verdict p:last-child { margin-bottom: 0; }
.verdict a { color: #f0c9ba; }

/* Ghost editor cards */
.gh-content .kg-card { margin: 2em 0; }
.kg-image-card img, .kg-gallery-card img { border-radius: var(--radius); }
.kg-image-card figcaption, .kg-gallery-card figcaption { text-align: center; font-size: 13px; color: var(--muted); margin-top: 10px; }

/* Wide and full-bleed images from the Ghost editor */
.kg-width-wide {
    position: relative;
    width: 80vw;
    min-width: 100%;
    margin-left: calc(50% - 40vw);
    margin-right: calc(50% - 40vw);
}
.kg-width-wide img { width: 100%; }
.kg-width-full {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}
.kg-width-full img { width: 100%; border-radius: 0; }
.kg-width-full figcaption { padding: 0 24px; }
.kg-bookmark-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.kg-bookmark-container { display: flex; color: var(--ink); }
.kg-bookmark-container:hover { text-decoration: none; }
.kg-bookmark-content { padding: 20px; flex: 1; }
.kg-bookmark-title { font-family: var(--serif); font-weight: 700; font-size: 17px; }
.kg-bookmark-description { color: var(--ink-soft); font-size: 14px; margin-top: 6px; }
.kg-bookmark-thumbnail img { width: 180px; height: 100%; object-fit: cover; }
.kg-callout-card { border-radius: var(--radius); }
.kg-toggle-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }

/* Issue footer */
.issue-footer { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.issue-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tag-chip {
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-soft);
    background: var(--card);
}
.tag-chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.share-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin-bottom: 32px;
}
.share-label { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.share-links { display: flex; gap: 8px; }
.share-link {
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-soft);
    background: var(--card);
    cursor: pointer;
    font-family: var(--sans);
}
.share-link:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.author-card {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 8px;
}
.author-name { font-family: var(--serif); font-weight: 700; font-size: 18px; margin: 0 0 6px; }
.author-name a { color: var(--ink); }
.author-bio { color: var(--ink-soft); font-size: 15px; margin: 0; }

.keep-reading { padding: 64px 0 72px; }

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    font-size: 14px;
    color: var(--muted);
}
.pagination a { font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #b7ac96; margin-top: 0; }
.footer-inner { padding-top: 56px; padding-bottom: 40px; }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 28px; }
.footer-title { font-family: var(--serif); font-weight: 700; font-size: 20px; color: var(--paper); margin: 0 0 4px; }
.footer-desc { margin: 0; font-size: 14px; max-width: 480px; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none; margin: 0 0 28px; padding: 0; }
.footer-nav a { color: #b7ac96; font-size: 14px; font-weight: 600; }
.footer-nav a:hover { color: var(--paper); }
.footer-copy { font-size: 13px; color: #7d7462; margin: 0; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.08); }

/* ---------- Error page ---------- */
.error-page { text-align: center; padding: 96px 24px; }
.error-title { font-size: clamp(34px, 5vw, 56px); margin: 0 0 12px; }
.error-text { color: var(--ink-soft); margin: 0 0 28px; }

/* ---------- Comments ---------- */
.gh-comments { margin: 48px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .post-grid { grid-template-columns: repeat(2, 1fr); }
    .feature-post { grid-template-columns: 1fr; }
    .feature-body { padding: 8px 28px 32px; }
    .feature-image img { min-height: 240px; }
}

@media (max-width: 720px) {
    .post-grid { grid-template-columns: 1fr; }
    .site-nav {
        display: none;
        position: absolute;
        top: 68px; left: 0; right: 0;
        background: var(--header-bg, var(--dark));
        border-bottom: 1px solid rgba(250, 247, 240, 0.12);
        padding: 12px 24px 20px;
    }
    .site-nav.open { display: block; }
    .site-nav ul { flex-direction: column; align-items: stretch; }
    .site-nav a { padding: 12px 4px; }
    .nav-toggle { display: inline-flex; }
    .header-inner { gap: 12px; }
    .subscribe-form { flex-direction: column; }
    .subscribe-box { padding: 36px 24px; }
    .issue-body { font-size: 17px; }
    .share-row { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
