/* =========================================================================
   Yazdan Properties Insights — theme stylesheet
   Brand: bronze #937D6A on cream #F9F5F1, Playfair Display + Inter
   ========================================================================= */

:root {
    --bronze: #937D6A;
    --bronze-dark: #6F5E4F;
    --bronze-soft: rgba(147, 125, 106, 0.08);
    --cream: #F9F5F1;
    --paper: #FFFFFF;
    --ink: #1A1A1A;
    --ink-soft: #3A3A3A;
    --muted: #767676;
    --border: #E8E1D8;

    --font-serif: "Playfair Display", "Times New Roman", Georgia, serif;
    --font-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

    --container: 1180px;
    --container-narrow: 720px;

    --radius-md: 14px;
    --radius-lg: 24px;
}

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

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

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--bronze);
    text-decoration: none;
    transition: color 150ms ease;
}
a:hover { color: var(--bronze-dark); }

::selection { background: var(--bronze); color: #fff; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.015em;
    line-height: 1.2;
    margin: 0 0 0.5em;
}

p { margin: 0 0 1.2em; }

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

/* ---------- Site header ------------------------------------------------- */
.site-header {
    background: var(--paper);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: saturate(180%) blur(8px);
}
.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 76px;
}
.site-brand { display: flex; align-items: center; }
.site-title {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.site-logo { max-height: 40px; width: auto; }

.site-nav { flex: 1; display: flex; justify-content: center; }
.site-nav ul {
    display: flex; gap: 28px; list-style: none; padding: 0; margin: 0;
}
.site-nav a {
    color: var(--ink); font-weight: 500; font-size: 15px;
    padding: 6px 0; border-bottom: 1.5px solid transparent;
}
.site-nav a:hover { color: var(--bronze); border-color: var(--bronze); }

.site-actions { display: flex; align-items: center; gap: 12px; }
.site-action {
    font-size: 14px; font-weight: 600; padding: 10px 18px;
    border-radius: 999px; transition: all 150ms ease;
    border: 1px solid transparent;
}
.site-action--ghost { color: var(--ink); }
.site-action--ghost:hover { color: var(--bronze); }
.site-action--primary {
    background: var(--bronze); color: #fff !important;
    border-color: var(--bronze);
}
.site-action--primary:hover { background: var(--bronze-dark); border-color: var(--bronze-dark); }

/* ---------- Hero -------------------------------------------------------- */
.hero {
    padding: 96px 0 80px;
    background: linear-gradient(180deg, var(--paper) 0%, var(--cream) 100%);
    text-align: center;
}
.hero-eyebrow {
    display: inline-block;
    font-size: 12px; font-weight: 700; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--bronze);
    margin-bottom: 20px;
}
.hero-title {
    font-size: clamp(36px, 5.2vw, 56px);
    line-height: 1.05; letter-spacing: -0.03em;
    max-width: 720px; margin: 0 auto 22px;
    text-wrap: balance;
}
.hero-sub {
    font-size: clamp(16px, 1.4vw, 19px);
    line-height: 1.55;
    color: var(--ink-soft);
    max-width: 560px; margin: 0 auto 40px;
    text-wrap: balance;
}

.hero-cta {
    display: flex; gap: 8px; max-width: 480px; margin: 0 auto;
    background: var(--paper); padding: 6px;
    border-radius: 999px; border: 1px solid var(--border);
    box-shadow: 0 4px 18px rgba(147, 125, 106, 0.08);
}
.hero-cta input {
    flex: 1; border: none; background: transparent;
    padding: 12px 18px; font: inherit; color: var(--ink);
    outline: none;
}
.hero-cta input::placeholder { color: var(--muted); }
.hero-cta button {
    background: var(--bronze); color: #fff;
    border: none; padding: 12px 24px;
    border-radius: 999px; font-weight: 600; cursor: pointer;
    transition: background 150ms ease;
}
.hero-cta button:hover { background: var(--bronze-dark); }

/* ---------- Section headers --------------------------------------------- */
.section-header { margin: 0 0 40px; text-align: center; }
.section-eyebrow {
    display: inline-block;
    font-size: 12px; font-weight: 700; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--bronze);
    margin-bottom: 10px;
}
.section-title {
    font-size: clamp(28px, 3.4vw, 40px);
    margin: 0;
}

/* ---------- Post feed --------------------------------------------------- */
.post-feed-section { padding: 80px 0 100px; }
.post-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

.post-card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
    display: flex; flex-direction: column;
}
.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(147, 125, 106, 0.16);
    border-color: rgba(147, 125, 106, 0.4);
}

.post-card-image-link { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.post-card-image { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.post-card:hover .post-card-image { transform: scale(1.04); }

.post-card-body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.post-card-tag {
    font-size: 11px; font-weight: 700; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--bronze);
    margin-bottom: 12px;
}
.post-card-title {
    font-size: 22px; line-height: 1.3; margin: 0 0 12px;
}
.post-card-title a { color: var(--ink); }
.post-card-title a:hover { color: var(--bronze); }
.post-card-excerpt {
    color: var(--ink-soft); font-size: 15px; flex: 1;
}
.post-card-meta {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
    color: var(--muted); font-size: 13px;
    margin-top: 18px; padding-top: 16px;
    border-top: 1px solid var(--border);
}
.post-card-dot { color: var(--border); }

/* ---------- Single post ------------------------------------------------- */
.post-header { padding: 80px 0 40px; text-align: center; }
.post-eyebrow {
    display: inline-block;
    font-size: 12px; font-weight: 700; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--bronze);
    margin-bottom: 18px;
}
.post-title {
    font-size: clamp(34px, 4.5vw, 56px);
    line-height: 1.1; letter-spacing: -0.025em;
    max-width: 820px; margin: 0 auto 20px;
}
.post-deck {
    font-family: var(--font-serif);
    font-size: clamp(18px, 2vw, 22px); font-weight: 400;
    color: var(--ink-soft); font-style: italic;
    max-width: 680px; margin: 0 auto 28px;
}
.post-meta { color: var(--muted); font-size: 14px; }
.post-meta-dot { color: var(--border); margin: 0 6px; }
.post-meta-author { font-weight: 600; color: var(--ink-soft); }

.post-feature {
    margin: 40px 0 60px;
    max-width: 1180px;
    margin-left: auto; margin-right: auto;
    padding: 0 24px;
}
.post-feature img {
    width: 100%; height: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}
.post-feature figcaption {
    text-align: center; color: var(--muted);
    font-size: 13px; margin-top: 14px; font-style: italic;
}

.post-body { padding-bottom: 80px; }

/* Koenig grid: lets editor "wide" and "full" images break out of the
   narrow column. Direct children default to the main column. */
.post-content {
    display: grid;
    grid-template-columns:
        [full-start] minmax(24px, 1fr)
        [wide-start] minmax(0, 144px)
        [main-start] min(720px, calc(100% - 48px)) [main-end]
        minmax(0, 144px) [wide-end]
        minmax(24px, 1fr) [full-end];
    font-size: 18px;
    line-height: 1.75;
    color: var(--ink-soft);
}
.post-content > * { grid-column: main-start / main-end; }
.post-content > .kg-width-wide { grid-column: wide-start / wide-end; }
.post-content > .kg-width-full { grid-column: full-start / full-end; }
.post-content > .kg-width-wide img,
.post-content > .kg-width-full img { width: 100%; height: auto; }
.post-content > .kg-width-full img { border-radius: 0; }

.post-content p { margin: 0 0 1.4em; }
.post-content h2 { font-size: 32px; margin: 1.6em 0 0.6em; color: var(--ink); }
.post-content h3 { font-size: 24px; margin: 1.5em 0 0.5em; color: var(--ink); }
.post-content ul, .post-content ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.post-content li { margin-bottom: 0.5em; }
.post-content blockquote {
    border-left: 3px solid var(--bronze);
    padding: 4px 0 4px 24px;
    margin: 1.6em 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 22px;
    color: var(--ink);
}
.post-content code {
    background: var(--bronze-soft);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.9em;
    color: var(--bronze-dark);
}
.post-content pre {
    background: #1a1a1a;
    color: #f5f5f5;
    padding: 24px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    line-height: 1.5;
}
.post-content pre code {
    background: none; padding: 0; color: inherit;
}
.post-content hr {
    border: none; border-top: 1px solid var(--border);
    margin: 2.4em 0;
}
.post-content img { border-radius: var(--radius-md); margin: 1.4em 0; max-width: 100%; height: auto; }

/* Koenig cards: bookmark, gallery, embed, callout, toggle, button */
.kg-image-card figcaption,
.kg-embed-card figcaption,
.kg-gallery-card figcaption,
.kg-video-card figcaption,
.kg-audio-card figcaption {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    padding: 12px 0 0;
    font-style: italic;
}

.kg-bookmark-card,
.kg-bookmark-publisher {
    position: relative;
    width: 100%;
}
.kg-bookmark-container {
    display: flex;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    min-height: 148px;
}
.kg-bookmark-content {
    flex-basis: 0;
    flex-grow: 999;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 50%;
}
.kg-bookmark-title { font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.kg-bookmark-description {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
    overflow-y: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.kg-bookmark-metadata {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
}
.kg-bookmark-icon { width: 20px; height: 20px; margin-right: 6px; }
.kg-bookmark-author { font-weight: 600; color: var(--ink-soft); }
.kg-bookmark-thumbnail {
    flex-basis: 24rem;
    flex-grow: 1;
    min-width: 33%;
    display: flex;
}
.kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
}

.kg-gallery-container { display: flex; flex-direction: column; }
.kg-gallery-row { display: flex; flex-direction: row; justify-content: center; }
.kg-gallery-image img { display: block; width: 100%; height: 100%; margin: 0; }
.kg-gallery-row + .kg-gallery-row { margin-top: 0.75em; }
.kg-gallery-image + .kg-gallery-image { margin-left: 0.75em; }

.kg-embed-card { display: flex; flex-direction: column; align-items: center; }

.kg-callout-card {
    display: flex;
    align-items: flex-start;
    padding: 20px 28px;
    border-radius: var(--radius-md);
    background: var(--bronze-soft);
    border-left: 3px solid var(--bronze);
    margin: 1.6em 0;
}
.kg-callout-emoji { padding-right: 16px; font-size: 22px; line-height: 1.4; }
.kg-callout-text { flex: 1; }

.kg-toggle-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin: 1.6em 0;
}
.kg-toggle-heading { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.kg-toggle-heading-text { font-weight: 600; color: var(--ink); }
.kg-toggle-content { padding-top: 12px; color: var(--ink-soft); }

.kg-button-card { display: flex; justify-content: center; margin: 1.4em 0; }
.kg-button-card a,
.kg-btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--bronze);
    color: #fff !important;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
}
.kg-button-card a:hover, .kg-btn:hover { background: var(--bronze-dark); }

.kg-header-card { padding: 60px 24px; text-align: center; }
.kg-product-card { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.kg-video-card video, .kg-audio-card audio { width: 100%; }

@media (max-width: 640px) {
    .kg-bookmark-container { flex-direction: column-reverse; }
    .kg-bookmark-thumbnail { flex-basis: 12rem; min-width: 100%; }
    .kg-product-card { grid-template-columns: 1fr; }
}

.post-tags {
    max-width: var(--container-narrow);
    margin: 60px auto 0;
    padding: 32px 24px 0;
    display: flex; flex-wrap: wrap; gap: 8px;
    border-top: 1px solid var(--border);
}
.post-tag {
    font-size: 12px; font-weight: 600; letter-spacing: 0.12em;
    text-transform: uppercase;
    background: var(--bronze-soft); color: var(--bronze-dark);
    padding: 6px 14px; border-radius: 999px;
}
.post-tag:hover { background: var(--bronze); color: #fff; }

/* ---------- Post CTA ---------------------------------------------------- */
.post-cta {
    background: var(--paper);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 60px 0;
    text-align: center;
}
.post-cta h3 {
    font-size: clamp(24px, 3vw, 32px);
    margin: 0 0 12px;
}
.post-cta p {
    color: var(--ink-soft);
    max-width: 480px;
    margin: 0 auto 28px;
}
.post-cta form {
    display: flex; gap: 8px; max-width: 460px; margin: 0 auto;
    background: var(--cream); padding: 6px;
    border-radius: 999px;
}
.post-cta input {
    flex: 1; border: none; background: transparent;
    padding: 12px 18px; font: inherit; outline: none;
}
.post-cta button {
    background: var(--bronze); color: #fff;
    border: none; padding: 12px 24px;
    border-radius: 999px; font-weight: 600; cursor: pointer;
}
.post-cta button:hover { background: var(--bronze-dark); }

/* ---------- Related ----------------------------------------------------- */
.related-section { padding: 60px 0 100px; background: var(--paper); border-top: 1px solid var(--border); }
.related-section .post-feed { gap: 24px; }

/* ---------- Archive (tag/author) ---------------------------------------- */
.archive-header {
    padding: 80px 0 40px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}
.archive-header-author { display: flex; gap: 24px; align-items: center; justify-content: center; }
.author-avatar { width: 80px; height: 80px; border-radius: 50%; }
.archive-eyebrow {
    display: inline-block;
    font-size: 12px; font-weight: 700; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--bronze);
    margin-bottom: 12px;
}
.archive-title { font-size: clamp(36px, 5vw, 56px); margin: 0 0 14px; }
.archive-description { color: var(--ink-soft); font-size: 17px; max-width: 560px; margin: 0 auto; }

/* ---------- Page -------------------------------------------------------- */
.page-header { padding: 80px 0 24px; text-align: center; }
.page-title { font-size: clamp(36px, 5vw, 56px); margin: 0; }
.page-deck {
    font-family: var(--font-serif);
    font-size: clamp(18px, 2vw, 22px); font-weight: 400;
    color: var(--ink-soft); font-style: italic;
    max-width: 680px; margin: 18px auto 0;
}
.page-feature { padding: 0 24px; margin: 40px auto 60px; max-width: 1180px; }
.page-feature img { width: 100%; border-radius: var(--radius-lg); }
.page-feature figcaption {
    text-align: center; color: var(--muted);
    font-size: 13px; margin-top: 14px; font-style: italic;
}
.page-body { padding-bottom: 80px; }

/* ---------- Pagination -------------------------------------------------- */
.pagination {
    display: flex; justify-content: center; gap: 24px; align-items: center;
    margin: 60px 0 0;
}
.pagination a, .pagination .page-number {
    color: var(--ink-soft); font-size: 14px; font-weight: 500;
}

/* ---------- Footer ------------------------------------------------------ */
.site-footer {
    background: var(--paper);
    border-top: 1px solid var(--border);
    padding: 60px 0 40px;
    color: var(--muted);
    font-size: 14px;
}
.site-footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px 24px;
}
.site-footer-title {
    font-family: var(--font-serif);
    font-size: 22px; font-weight: 700;
    color: var(--ink);
    display: block; margin-bottom: 8px;
}
.site-footer-description { margin: 0; max-width: 360px; }
.site-footer-nav ul {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 8px;
}
.site-footer-nav a { color: var(--ink-soft); }
.site-footer-nav a:hover { color: var(--bronze); }
.site-footer-meta {
    grid-column: 1 / -1;
    display: flex; justify-content: space-between; flex-wrap: wrap;
    gap: 12px; padding-top: 32px;
    border-top: 1px solid var(--border);
}

/* ---------- Mobile ------------------------------------------------------ */
@media (max-width: 768px) {
    .site-header-inner { gap: 12px; }
    .site-nav { display: none; }
    .site-action--ghost { padding: 8px 12px; }
    .site-action--primary { padding: 8px 16px; }
    .hero { padding: 60px 0 40px; }
    .hero-cta { flex-direction: column; padding: 12px; border-radius: var(--radius-md); }
    .hero-cta button { width: 100%; }
    .post-feed-section { padding: 60px 0; }
    .post-feed { gap: 24px; }
    .post-feature { padding: 0; }
    .post-feature img { border-radius: 0; }
    .site-footer-inner { grid-template-columns: 1fr; }
}
