:root {
    --bg: #141210;
    --bg-elevated: #1f1c19;
    --bg-card: #2a2622;
    --text: #f7f2eb;
    --text-muted: #c4b8ab;
    --accent: #d9ad72;
    --accent-hover: #ecc995;
    --border: #3f3933;
    --focus: #ecc995;
    --error: #e07a6a;
    --font-serif: 'Libre Baskerville', Georgia, serif;
    --font-sans: 'Source Sans 3', system-ui, sans-serif;
    --max-width: 76rem;
    --radius: 8px;
    --shadow-lg: 0 28px 56px rgba(0, 0, 0, 0.45);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.35);
    --gradient-hero: linear-gradient(135deg, rgba(217, 173, 114, 0.08) 0%, transparent 55%);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text);
    background: var(--bg);
    background-image: var(--gradient-hero);
    background-attachment: fixed;
    overflow-x: clip;
    max-width: 100%;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    padding: 0.75rem 1.25rem;
    background: var(--accent);
    color: var(--bg);
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(26, 24, 22, 0.95);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(8px);
}

.header-bar {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text);
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.15rem;
}

.brand-icon { color: var(--accent); font-size: 1.3rem; }

.site-nav {
    display: flex;
    gap: 1.5rem;
    margin-left: auto;
}

.site-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a.is-active { color: var(--text); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
}

.hero-editorial {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 1rem;
}

h1, h2, h3 {
    font-family: var(--font-serif);
    line-height: 1.25;
    font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 1.25rem; }

.lead, .page-lead {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin: 0 0 1.5rem;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); color: var(--bg); }

.btn-secondary, .btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover, .btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.hero-visual img {
    border-radius: var(--radius);
    box-shadow: 0 24px 48px rgba(0,0,0,0.4);
}

.featured-posts, .intro-block, .philosophy-block, .newsletter-strip, .page-header {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2rem;
}

.section-head h2 { margin: 0; font-size: 1.75rem; }

.text-link { color: var(--accent); font-weight: 500; }

.post-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 1.5rem;
}

.brand-icon img { border-radius: 6px; display: block; }

.post-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.page-header-media { padding-top: 0; }

.page-banner {
    margin: 0 0 2rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.page-banner img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}

.page-banner-legal img { max-height: 280px; }

.page-header-text { padding: 0 0 1rem; }

.archive-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 1.75rem;
}

.archive-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease;
}

.archive-card:hover { transform: translateY(-3px); }

.archive-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.archive-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.archive-card-body { padding: 1.25rem; }

.archive-card-body time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.archive-card-body h2 {
    font-size: 1.2rem;
    margin: 0.4rem 0 0.6rem;
    color: var(--text);
}

.topic-block-media {
    padding: 0;
    overflow: hidden;
}

.topic-block-media img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.topic-block-body { padding: 1.5rem; }

.intro-aside-media {
    padding: 0;
    overflow: hidden;
    background: transparent;
    border: none;
}

.intro-aside-media img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.contact-form-wrap {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.contact-details {
    background: var(--bg-elevated);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.map-frame {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.map-frame iframe {
    width: 100%;
    height: 320px;
    border: 0;
    display: block;
}

.error-visual {
    max-width: 36rem;
    margin: 0 auto 2rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.form-errors {
    background: rgba(224, 122, 106, 0.12);
    border: 1px solid var(--error);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.post-hero img {
    box-shadow: var(--shadow-lg);
}

.article-figure img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

@media (max-width: 900px) {
    .archive-grid { grid-template-columns: 1fr; }
}

.post-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-card-link:hover h3 { color: var(--accent); }

.post-card-body { padding: 1.25rem; }

.post-meta {
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 0.5rem;
}

.post-card h3 {
    font-size: 1.15rem;
    margin: 0 0 0.75rem;
    transition: color 0.2s;
}

.post-card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

.intro-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.intro-aside {
    background: var(--bg-elevated);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.topic-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.topic-list li { margin-bottom: 0.5rem; }
.topic-list a { color: var(--text-muted); text-decoration: none; }
.topic-list a:hover { color: var(--accent); }

.newsletter-strip {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.strip-inner { text-align: center; max-width: 36rem; margin: 0 auto; }

.page-header { padding-top: 3rem; padding-bottom: 1rem; }
.page-header h1 { margin-bottom: 0.75rem; }

.about-layout {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
}

.about-photo img { border-radius: var(--radius); }

.contact-layout {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-form .field { margin-bottom: 1.25rem; }
.contact-form label { display: block; margin-bottom: 0.4rem; font-weight: 500; }
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
}
.contact-form input:focus, .contact-form textarea:focus {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}
.field.has-error input, .field.has-error textarea { border-color: var(--error); }
.field-hp {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
}

.form-success {
    background: var(--bg-card);
    border: 1px solid var(--accent);
    padding: 2rem;
    border-radius: var(--radius);
}
.form-success h2 { color: var(--accent); margin-top: 0; }

.map-frame iframe {
    width: 100%;
    height: 320px;
    border: 0;
    display: block;
}

.topics-grid, .legal-body, .article-body, .post-single {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 1.5rem 4rem;
}

.archive-item {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
}
.archive-item time { font-size: 0.85rem; color: var(--text-muted); }
.archive-item h2 { font-size: 1.35rem; margin: 0.5rem 0; }
.archive-item h2 a { color: var(--text); text-decoration: none; }
.archive-item h2 a:hover { color: var(--accent); }
.archive-tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    color: var(--accent);
}

.topics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.topic-block {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.legal-body { max-width: 42rem; }
.legal-body h2 { font-size: 1.35rem; margin-top: 2rem; }
.legal-body h3 { font-size: 1.1rem; }

.post-header { max-width: 42rem; margin-bottom: 2rem; }
.post-hero img { border-radius: var(--radius); margin-bottom: 2rem; }
.post-content { max-width: 42rem; }
.post-content .lead { font-family: var(--font-serif); font-size: 1.25rem; }
.post-footer { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }

.error-page {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 6rem 1.5rem;
    text-align: center;
}

.site-footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1.5rem 2rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 2rem;
}

.footer-title {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.15rem;
    margin: 0 0 0.75rem;
}

.footer-desc { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

.footer-col h2 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin: 0 0 1rem;
}

.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; }
.footer-col a:hover { color: var(--accent); }

.footer-contact address { font-style: normal; font-size: 0.95rem; color: var(--text-muted); }
.footer-contact p { margin: 0 0 0.35rem; }

.footer-base {
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.3);
}

.cookie-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem;
}

.cookie-inner h2 { font-size: 1.1rem; margin: 0 0 0.5rem; }
.cookie-inner p { margin: 0 0 1rem; color: var(--text-muted); font-size: 0.95rem; }

.cookie-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.cookie-link { font-size: 0.9rem; margin-left: 0.5rem; }

@media (max-width: 900px) {
    .hero-grid, .post-grid, .intro-layout, .about-layout,
    .contact-layout, .topics-grid, .footer-inner { grid-template-columns: 1fr; }
    .post-grid { grid-template-columns: 1fr; }
    .nav-toggle { display: flex; }
    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-elevated);
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--border);
    }
    .site-nav.is-open { display: flex; }
    .header-bar { position: relative; flex-wrap: wrap; }
}
