/* Headout Newsroom — starter theme styles.
   Brand tokens live in :root; swap these for the real Headout palette. */

:root {
    --brand:        #6c2bd9;   /* placeholder — replace with Headout brand */
    --ink:          #17171a;
    --ink-soft:     #55555f;
    --line:         #e6e6ea;
    --bg:           #ffffff;
    --bg-soft:      #f7f7f9;
    --radius:       14px;
    --wrap:         1120px;
    --wrap-narrow:  720px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

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

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

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

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

/* ---- Header ---- */
.site-header {
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.9);
    backdrop-filter: saturate(180%) blur(8px);
    z-index: 10;
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}
.site-header__logo { max-height: 32px; width: auto; }
.site-header__title { font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.site-nav ul {
    list-style: none;
    display: flex;
    gap: 22px;
    margin: 0;
    padding: 0;
    font-size: 15px;
    font-weight: 500;
}
.site-nav a:hover { color: var(--brand); }

/* ---- Page head ---- */
.page-head {
    padding: 56px 0 40px;
    max-width: var(--wrap-narrow);
}
.page-head__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand);
    margin: 0 0 8px;
}
.page-head__title { font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
.page-head__desc { color: var(--ink-soft); font-size: 19px; margin: 14px 0 0; }

/* ---- Feed grid ---- */
.post-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    padding-bottom: 64px;
}

.post-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
    transition: transform .18s ease, box-shadow .18s ease;
}
.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(20,20,26,0.10);
}
.post-card__image-wrap { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-soft); }
.post-card__image { width: 100%; height: 100%; object-fit: cover; }
.post-card__content { padding: 20px 22px 24px; }
.post-card__tag {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 12px;
    font-weight: 700;
    color: var(--brand);
    margin-bottom: 10px;
}
.post-card__title { font-size: 21px; line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 10px; }
.post-card__excerpt { color: var(--ink-soft); font-size: 15px; margin: 0 0 16px; }
.post-card__meta { color: var(--ink-soft); font-size: 13px; }

/* ---- Article ---- */
.article-head { padding: 56px 0 28px; }
.article-head__tag {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 13px;
    font-weight: 700;
    color: var(--brand);
    margin-bottom: 14px;
}
.article-head__title { font-size: 44px; line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
.article-head__excerpt { font-size: 21px; color: var(--ink-soft); margin: 18px 0 0; }
.article-head__meta {
    display: flex;
    gap: 16px;
    align-items: center;
    color: var(--ink-soft);
    font-size: 15px;
    margin-top: 22px;
}
.article-head__author { font-weight: 600; color: var(--ink); }

.article-image {
    margin: 8px auto 40px;
    max-width: 1000px;
}
.article-image img { width: 100%; border-radius: var(--radius); }
.article-image figcaption {
    text-align: center;
    color: var(--ink-soft);
    font-size: 14px;
    margin-top: 12px;
}

.article-body { padding-bottom: 48px; }
.gh-content > * { margin: 0 0 1.4em; }
.gh-content h2 { font-size: 30px; line-height: 1.2; letter-spacing: -0.01em; margin-top: 1.6em; }
.gh-content h3 { font-size: 23px; margin-top: 1.4em; }
.gh-content img { border-radius: var(--radius); }
.gh-content figcaption { text-align: center; color: var(--ink-soft); font-size: 14px; }

/* Koenig editor width cards — break out of the narrow text column. */
.gh-content .kg-width-wide {
    position: relative;
    width: 85vw;
    max-width: 1080px;
    margin-left: 50%;
    transform: translateX(-50%);
}
.gh-content .kg-width-full {
    position: relative;
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}
.gh-content .kg-width-full img { border-radius: 0; }
.gh-content blockquote {
    border-left: 3px solid var(--brand);
    padding-left: 20px;
    margin-left: 0;
    color: var(--ink-soft);
    font-style: italic;
}
.gh-content a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.gh-content pre {
    background: var(--ink);
    color: #f4f4f6;
    padding: 18px 20px;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 14px;
}

.article-foot { border-top: 1px solid var(--line); padding: 24px 0 64px; display: flex; gap: 10px; flex-wrap: wrap; }
.article-foot__tag {
    font-size: 13px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-soft);
}
.article-foot__tag:hover { border-color: var(--brand); color: var(--brand); }

/* ---- Pagination ---- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
    padding: 8px 0 72px;
    font-size: 15px;
    font-weight: 500;
}
.pagination a:hover { color: var(--brand); }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); }
.site-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
    color: var(--ink-soft);
    font-size: 14px;
}
.site-footer__nav ul { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; }

/* ---- Error ---- */
.error-page { text-align: center; padding: 96px 0; }
.error-page__code { font-size: 72px; margin: 0; color: var(--brand); }
.error-page__msg { color: var(--ink-soft); font-size: 20px; }
.error-page__home { color: var(--brand); font-weight: 600; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .page-head__title { font-size: 32px; }
    .article-head__title { font-size: 32px; }
    .article-head { padding-top: 36px; }
    body { font-size: 17px; }
}
