/* ─── Variables ─── */

:root {
    --bg: #faf8f5;
    --cream: #f5f0e8;
    --text: #2d2a26;
    --muted: #7a756d;
    --accent: #c45d3a;
    --accent-hover: #a84d2f;
    --border: #e5e0d8;
}

/* ─── Reset ─── */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 18px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans 3', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* ─── Navigation ─── */

nav {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text);
    text-decoration: none;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    background: var(--accent);
    color: #fff !important;
    padding: 0.5rem 1.1rem;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.nav-cta:hover {
    background: var(--accent-hover) !important;
    color: #fff !important;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    width: 28px;
    height: 20px;
    position: relative;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 9px; }
.menu-toggle span:nth-child(3) { top: 18px; }

.menu-toggle.active span:nth-child(1) {
    top: 9px;
    transform: rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    top: 9px;
    transform: rotate(-45deg);
}

.mobile-nav {
    display: none;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.mobile-nav.active {
    display: block;
}

.mobile-nav a {
    display: block;
    padding: 0.6rem 2rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--accent);
}

.mobile-nav .nav-cta {
    display: inline-block;
    margin: 0.6rem 2rem;
    text-align: center;
}

/* ─── Layout ─── */

.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ─── Page Header (list & detail pages) ─── */

.page-header {
    padding: 2.5rem 0 1.5rem;
}

.page-header h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.8rem;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 0.35rem;
}

.page-header p {
    font-size: 0.95rem;
    color: var(--muted);
}

.page-header h1 em {
    font-style: italic;
    color: var(--accent);
}

/* ─── Article / Case Study Detail Pages ─── */

.article-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 2rem;
}

.page-header.detail {
    padding: 5rem 0 3rem;
    border-bottom: 1px solid var(--border);
}

.page-header.detail h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.article-date {
    font-size: 0.85rem;
    color: var(--muted);
    font-style: italic;
}

.tags {
    font-size: 0.85rem;
    color: var(--accent);
    font-style: italic;
}

.article-section {
    padding: 4rem 0;
}

.article-content {
    line-height: 1.8;
}

.article-content h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 400;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    color: var(--text);
}

.article-content h3:first-child {
    margin-top: 0;
}

.article-content p {
    margin-bottom: 1.15rem;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.8;
}

.article-content strong {
    color: var(--text);
    font-weight: 600;
}

.article-content a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.article-content a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.article-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 1.5rem 1.75rem;
    margin: 2rem 0;
    background: var(--cream);
    border-radius: 6px;
}

.article-content blockquote p {
    color: var(--text);
    font-style: italic;
    margin-bottom: 0;
}

.article-content ul {
    margin-bottom: 1.15rem;
    padding-left: 1.5rem;
    color: var(--muted);
}

.article-content ul li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--accent);
}

.back-link svg {
    width: 16px;
    height: 16px;
}

.subscribe-link {
    display: inline-block;
    margin-top: 0.75rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.subscribe-link:hover {
    color: var(--accent-hover);
}

/* ─── Article List ─── */

.articles-section {
    padding: 2rem 0 5rem;
    border-bottom: 1px solid var(--border);
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.article-card {
    display: block;
    text-decoration: none;
    padding: 2rem;
    background: var(--cream);
    border-radius: 8px;
    transition: all 0.2s;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.article-card-date {
    font-size: 0.8rem;
    color: var(--muted);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.article-card h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.article-card h2 em {
    font-style: italic;
    color: var(--accent);
}

.article-card p {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-card-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.article-card-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.article-card:hover .article-card-link svg {
    transform: translateX(3px);
}

/* ─── Case Study List ─── */

.case-studies-section {
    padding: 2rem 0 5rem;
    border-bottom: 1px solid var(--border);
}

.case-study-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.case-study-card {
    display: block;
    text-decoration: none;
    padding: 2rem;
    background: var(--cream);
    border-radius: 8px;
    transition: all 0.2s;
}

.case-study-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.case-study-card h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.case-study-card p {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.case-study-card .tags {
    display: block;
    font-size: 0.78rem;
    font-style: italic;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.case-study-card-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.case-study-card-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.case-study-card:hover .case-study-card-link svg {
    transform: translateX(3px);
}

/* ─── CTA Section ─── */

.cta-section {
    padding: 2.5rem 0;
    text-align: center;
    background: var(--cream);
}

.cta-section h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.cta-section p {
    color: var(--muted);
    margin-bottom: 1rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-secondary {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 1rem 1.8rem;
    border: 1.5px solid var(--accent);
    border-radius: 4px;
    transition: all 0.2s;
}

.cta-secondary:hover {
    background: var(--accent);
    color: #fff;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--accent);
    color: #fff;
    padding: 1rem 1.8rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.hero-cta:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.hero-cta svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s;
}

.hero-cta:hover svg {
    transform: translateX(3px);
}

/* ─── Footer ─── */

footer {
    padding: 2rem 0;
    background: var(--bg);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom {
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    font-style: italic;
    color: var(--muted);
}

.footer-left {
    font-size: 1.5rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent);
}

/* ─── Responsive (shared) ─── */

@media (max-width: 768px) {
    html { font-size: 16px; }
    .nav-links { display: none; }
    .menu-toggle { display: block; }

    .page-header.detail {
        padding: 3.5rem 0 2rem;
    }

    .page-header.detail h1 {
        font-size: 1.8rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .article-section {
        padding: 3rem 0;
    }

    .article-content h3 {
        font-size: 1.3rem;
        margin-top: 2.5rem;
    }

    .article-card {
        padding: 1.5rem;
    }

    .article-card h2 {
        font-size: 1.2rem;
    }


    .case-study-card {
        padding: 1.5rem;
    }

    .case-study-card h2 {
        font-size: 1.2rem;
    }

    .footer-top {
        flex-direction: column;
        gap: 1rem;
    }
}
