:root {
    --bg: #f5efe4;
    --surface: rgba(255, 250, 242, 0.82);
    --surface-strong: #fff9f0;
    --text: #1f1a17;
    --muted: #665d56;
    --accent: #bf5a36;
    --accent-dark: #8c3f24;
    --line: rgba(31, 26, 23, 0.12);
    --shadow: 0 18px 45px rgba(85, 47, 24, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(191, 90, 54, 0.18), transparent 30%),
        radial-gradient(circle at bottom right, rgba(49, 92, 173, 0.12), transparent 25%),
        linear-gradient(180deg, #f8f2e8 0%, #f1e8d8 100%);
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

main {
    position: relative;
}

.container {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

.narrow {
    width: min(760px, 100%);
}

.site-shell {
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
    background: rgba(245, 239, 228, 0.72);
    border-bottom: 1px solid var(--line);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 3.5rem;
    height: 3.5rem;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #e8a169);
    color: #fff;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.site-nav a {
    padding: 0.4rem 0;
    color: var(--muted);
    border-bottom: 2px solid transparent;
}

.site-nav a.active,
.site-nav a:hover {
    color: var(--text);
    border-color: var(--accent);
}

.menu-toggle {
    display: none;
    background: none;
    border: 0;
    padding: 0.25rem;
}

.menu-toggle span {
    display: block;
    width: 1.5rem;
    height: 2px;
    margin: 0.3rem 0;
    background: var(--text);
}

.hero,
.section,
.article-hero {
    padding: 4.5rem 0;
}

.hero-grid,
.article-hero-grid,
.contact-grid,
.accent-band-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    align-items: center;
}

.hero h1,
.article-hero h1,
.page-intro h1 {
    font-family: 'Source Serif 4', serif;
    font-size: clamp(2.8rem, 5vw, 5rem);
    line-height: 0.95;
    margin: 0.5rem 0 1rem;
}

.hero-copy,
.page-intro p,
.article-content p,
.archive-item p,
.topic-card p,
.contact-grid p,
.footer-copy {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.8;
}

.eyebrow,
.card-label,
.post-card-meta,
.tag {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    color: var(--accent-dark);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.9rem 1.4rem;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #d97f58);
    box-shadow: var(--shadow);
    border: 0;
}

.button-secondary {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.45);
}

.hero-card,
.post-card,
.archive-item,
.topic-card,
.contact-form,
.sidebar-box {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 2rem;
}

.meta-row {
    display: flex;
    gap: 1rem;
    color: var(--muted);
    flex-wrap: wrap;
}

.section-heading {
    margin-bottom: 2rem;
}

.section-heading h2,
.accent-band h2,
.archive-item h2,
.post-card h3,
.topic-card h3 {
    font-family: 'Source Serif 4', serif;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    margin: 0.4rem 0;
}

.card-grid,
.topic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.topic-card {
    text-align: center;
}

.post-card {
    overflow: hidden;
}

.post-card-link {
    display: block;
    height: 100%;
    color: inherit;
}

.post-card-image {
    min-height: 220px;
    background-position: center;
    background-size: cover;
}

.post-card-body {
    padding: 1.5rem;
}

.accent-band {
    background: linear-gradient(135deg, rgba(191, 90, 54, 0.12), rgba(42, 53, 79, 0.08));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.article-hero-grid {
    grid-template-columns: minmax(0, 1fr);
}

.article-hero-copy {
    display: grid;
    gap: 1.25rem;
}

.article-hero-copy .hero-copy,
.article-hero-copy .meta-row {
    margin: 0;
}

.article-image-frame {
    margin: 0.25rem 0 0.5rem;
    width: 500px;
    height: 700px;
    overflow: hidden;
    justify-self: center;
}

.article-image-frame img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius);
    object-fit: cover;
}

.archive-item-link {
    color: inherit;
}

.archive-item-link:hover,
.post-card-link:hover h3,
.read-more-link:hover {
    color: var(--accent-dark);
}

.read-more-link {
    display: inline-flex;
    margin-top: 0.85rem;
    font-weight: 700;
    color: var(--accent);
}

.topic-card .read-more-link {
    justify-self: center;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 0.9fr);
    gap: 2rem;
}

.article-content {
    background: var(--surface-strong);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.article-content blockquote {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--accent);
    background: rgba(191, 90, 54, 0.08);
    font-family: 'Source Serif 4', serif;
    font-size: 1.5rem;
}

.article-sidebar {
    display: grid;
    gap: 1rem;
    align-self: start;
}

.sidebar-box {
    padding: 1.5rem;
}

.check-list {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--muted);
    line-height: 1.8;
}

.archive-list {
    display: grid;
    gap: 1rem;
}

.archive-item {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
}

.tag {
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    white-space: nowrap;
}

.contact-form {
    padding: 1.5rem;
    display: grid;
    gap: 0.8rem;
}

.contact-form label {
    font-size: 0.95rem;
    font-weight: 700;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0.9rem 1rem;
    font: inherit;
    background: rgba(255, 255, 255, 0.7);
}

.contact-form input[type='date'] {
    appearance: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 2px solid rgba(191, 90, 54, 0.18);
    border-color: var(--accent);
}

.form-message {
    border-radius: 16px;
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
}

.form-message.success {
    background: rgba(44, 128, 87, 0.12);
    color: #175a3a;
}

.form-message.error {
    background: rgba(189, 58, 47, 0.12);
    color: #7f271f;
}

.site-footer {
    padding: 2rem 0 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.footer-title {
    font-weight: 700;
    margin-bottom: 0.7rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
    color: var(--muted);
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .container {
        width: min(100% - 1.5rem, 1120px);
    }

    .hero-grid,
    .article-hero-grid,
    .contact-grid,
    .article-layout,
    .accent-band-grid,
    .card-grid,
    .topic-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 1px);
        right: 1rem;
        left: 1rem;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(255, 249, 240, 0.98);
        box-shadow: var(--shadow);
    }

    .site-nav.open {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .hero-card,
    .article-content,
    .contact-form,
    .sidebar-box,
    .archive-item,
    .topic-card {
        padding: 1.35rem;
    }

    .post-card-image {
        min-height: 200px;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 1rem, 1120px);
    }

    .hero,
    .section,
    .article-hero {
        padding: 3rem 0;
    }

    .archive-item {
        flex-direction: column;
    }

    .nav-wrap {
        padding: 0.85rem 0;
    }

    .brand {
        gap: 0.65rem;
        font-size: 0.95rem;
    }

    .brand-mark {
        width: 2.2rem;
        height: 2.2rem;
    }

    .hero h1,
    .article-hero h1,
    .page-intro h1 {
        font-size: clamp(2.2rem, 10vw, 3.2rem);
        line-height: 1;
    }

    .hero-copy,
    .page-intro p,
    .article-content p,
    .archive-item p,
    .topic-card p,
    .contact-grid p,
    .footer-copy {
        font-size: 1rem;
        line-height: 1.65;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .button,
    .contact-form .button {
        width: 100%;
    }

    .meta-row {
        gap: 0.5rem 1rem;
        font-size: 0.95rem;
    }

    .section-heading {
        margin-bottom: 1.5rem;
    }

    .section-heading h2,
    .accent-band h2,
    .archive-item h2,
    .post-card h3,
    .topic-card h3 {
        font-size: clamp(1.45rem, 7vw, 2rem);
    }

    .post-card-body,
    .hero-card,
    .article-content,
    .contact-form,
    .sidebar-box,
    .archive-item,
    .topic-card {
        padding: 1.2rem;
    }

    .post-card-image,
    .article-image-frame img {
        min-height: 240px;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 0.85rem 0.9rem;
        font-size: 1rem;
    }

    .form-message {
        font-size: 0.92rem;
    }
}

@media (max-width: 420px) {
    .hero,
    .section,
    .article-hero {
        padding: 2.5rem 0;
    }

    .site-nav {
        left: 0.5rem;
        right: 0.5rem;
    }

    .hero h1,
    .article-hero h1,
    .page-intro h1 {
        font-size: 2rem;
    }

    .button {
        padding: 0.85rem 1.1rem;
    }

    .tag {
        white-space: normal;
    }
}