/* TryThisFuel Ghost theme — fresh green scheme
   Palette: bg #FAFBF8 / ink #2C2C2A / accent #48A848 / surface #FFF */

:root {
    --bg: #FAFBF8;
    --surface: #FFFFFF;
    --ink: #2C2C2A;
    --muted: #6B6F68;
    --line: #E4E8E1;
    --red: #48A848;
    --red-dark: #2E6B2E;
    --gh-font-heading: "Poppins", "Avenir Next", sans-serif;
    --gh-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --display: var(--gh-font-heading);
    --body: var(--gh-font-body);
    --radius: 10px;
}

* { box-sizing: border-box; }

html { font-size: 16px; }

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

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

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

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ── Wordmark: TRY [THIS] WOD lockup (box radius ≈ 6% of font size) ── */
.wordmark {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.7rem;
    letter-spacing: 0.02em;
    color: var(--ink);
    text-transform: uppercase;
    white-space: nowrap;
}
.wordmark-sm { font-size: 1.1rem; }
.this-box {
    display: inline-block;
    background: var(--red);
    color: #fff;
    border-radius: 0.06em;
    padding: 0 0.16em;
    line-height: 1.25;
}

/* ── Header ── */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.header-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 18px;
    padding-bottom: 14px;
    flex-wrap: wrap;
}
.site-brand { display: inline-flex; align-items: center; }
.site-logo { height: 44px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.site-nav .nav {
    display: flex; align-items: center; gap: 22px;
    list-style: none; margin: 0; padding: 0;
}
.site-nav .nav a {
    color: var(--ink);
    font-weight: 500;
    font-size: 0.95rem;
}
.site-nav .nav a:hover { color: var(--red); }

.tagline {
    font-family: var(--display);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
    padding-bottom: 12px;
}

/* ── Buttons ── */
.btn {
    display: inline-block;
    font-family: var(--display);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); color: #fff; transform: translateY(-1px); }

/* ── Intro ── */
.site-intro { padding: 56px 0 32px; max-width: 760px; }
.intro-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(1.8rem, 4.3vw, 2.8rem);
    line-height: 1.15;
    margin: 0.2em 0;
}
.intro-sub { color: var(--muted); margin: 0; }

/* ── Post grid / cards ── */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
    padding: 32px 0 56px;
}
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(24, 27, 31, 0.10);
}
.card-link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.card-link:hover { color: inherit; }
.card-image { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg); }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-tag {
    display: inline-block;
    align-self: flex-start;
    font-family: var(--display);
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
    background: var(--red);
    border-radius: 4px;
    padding: 2px 8px;
}
a.card-tag:hover { background: var(--red-dark); color: #fff; }
.card-title {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.3rem;
    line-height: 1.25;
    margin: 0;
}
.card-excerpt { color: var(--muted); font-size: 0.95rem; margin: 0; }
.card-meta {
    margin-top: auto;
    padding-top: 8px;
    color: var(--muted);
    font-size: 0.82rem;
    display: flex; align-items: center; gap: 6px;
}
.dot { color: var(--line); }

/* ── Pagination ── */
.pagination {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 0 64px;
    font-family: var(--display);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.9rem;
}
.pagination .page-number { color: var(--muted); }

/* ── Post page ── */
.post { padding: 56px 0 72px; }
.post-header { max-width: 880px; margin: 0 auto; }
.post-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(1.9rem, 4.6vw, 3.1rem);
    line-height: 1.12;
    margin: 0.25em 0;
}
.post-excerpt { color: var(--muted); font-size: 1.15rem; margin: 0 0 8px; }
.post-meta { padding: 4px 0 24px; }
.post-feature { margin: 0 0 8px; }
.post-feature img { border-radius: var(--radius); width: 100%; }
.post-feature figcaption {
    color: var(--muted); font-size: 0.82rem; text-align: center; padding-top: 8px;
}

.post-content { max-width: 720px; margin: 0 auto; padding-top: 24px; font-size: 1.06rem; }
.post-content h2, .post-content h3 {
    font-family: var(--display);
    font-weight: 600;
    line-height: 1.25;
    margin: 1.6em 0 0.5em;
}
.post-content h2 { font-size: 1.7rem; }
.post-content h3 { font-size: 1.3rem; }
.post-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
.post-content blockquote {
    margin: 1.6em 0;
    padding: 4px 0 4px 20px;
    border-left: 4px solid var(--red);
    color: var(--ink);
    font-weight: 500;
}
.post-content ul, .post-content ol { padding-left: 1.3em; }
.post-content li { margin: 0.3em 0; }
.post-content table {
    width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.95rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
}
.post-content th, .post-content td {
    padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left;
}
.post-content th {
    font-family: var(--display); font-weight: 600; text-transform: uppercase;
    font-size: 0.8rem; letter-spacing: 0.08em; background: var(--bg);
}
.post-content code {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 4px; padding: 1px 6px; font-size: 0.9em;
}
.post-content pre {
    background: var(--ink); color: #fff; border-radius: 8px;
    padding: 18px 20px; overflow-x: auto;
}
.post-content pre code { background: none; border: none; color: inherit; padding: 0; }

/* Koenig width cards */
.kg-width-wide { max-width: 1000px; margin-left: 50%; transform: translateX(-50%); width: calc(100vw - 48px); }
.kg-width-full { max-width: none; margin-left: 50%; transform: translateX(-50%); width: calc(100vw - 48px); }
@media (min-width: 1048px) {
    .kg-width-wide { width: 1000px; }
}
.kg-image { border-radius: var(--radius); margin: 0 auto; }
figure.kg-card { margin: 1.8em 0; }
figure.kg-card figcaption { color: var(--muted); font-size: 0.82rem; text-align: center; padding-top: 8px; }

/* ── Subscribe CTA ── */
.post-cta {
    max-width: 720px;
    margin: 56px auto 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 4px solid var(--red);
    border-radius: var(--radius);
    padding: 36px 32px;
    text-align: center;
}
.cta-title {
    font-family: var(--display);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.6rem;
    margin: 12px 0 6px;
}
.cta-text { color: var(--muted); margin: 0 0 18px; }

/* ── Footer ── */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--line);
    margin-top: 24px;
}
.footer-wrap {
    display: flex; align-items: center; justify-content: space-between;
    gap: 18px; flex-wrap: wrap;
    padding-top: 28px; padding-bottom: 28px;
}
.footer-nav .nav {
    display: flex; gap: 18px; list-style: none; margin: 0; padding: 0;
    font-size: 0.88rem;
}
.footer-nav .nav a { color: var(--muted); }
.footer-nav .nav a:hover { color: var(--red); }
.footer-meta { color: var(--muted); font-size: 0.82rem; margin: 0; }
.footer-meta a { color: var(--muted); text-decoration: underline; }

/* ── Error page ── */
.error-wrap { padding: 96px 24px; text-align: center; }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .card, .btn { transition: none; }
    .card:hover, .btn-red:hover { transform: none; }
}

/* ── Mobile ── */
@media (max-width: 720px) {
    .site-intro { padding: 36px 0 16px; }
    .post { padding: 36px 0 56px; }
    .post-grid { gap: 18px; padding: 24px 0 40px; }
    .header-wrap { gap: 12px; }
}
