/* ═══════════════════════════════════════════════════════════════════════════
   Lightweight Markdown CMS — Stylesheet
   Inspired by jameshoffmann.co.uk: clean, spacious, editorial feel
   Fonts: League Spartan (headings), Quicksand (body) — self-hosted / DSGVO
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── @font-face: League Spartan (Headings) ────────────────────────────── */
@font-face {
    font-family: 'League Spartan';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/league-spartan-latin-400-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'League Spartan';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/league-spartan-latin-500-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'League Spartan';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/league-spartan-latin-600-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'League Spartan';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/league-spartan-latin-700-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'League Spartan';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('fonts/league-spartan-latin-800-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'League Spartan';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('fonts/league-spartan-latin-900-normal.woff2') format('woff2');
}

/* ─── @font-face: Quicksand (Body) ────────────────────────────────────── */
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('fonts/quicksand-latin-300-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/quicksand-latin-400-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/quicksand-latin-500-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/quicksand-latin-600-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Quicksand';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/quicksand-latin-700-normal.woff2') format('woff2');
}

/* ─── Reset & Base ─────────────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #ffffff;
    --color-text: #1a1a1a;
    --color-text-light: #555555;
    --color-border: #e0e0e0;
    --color-link: #1a1a1a;
    --color-link-hover: #666666;
    --font-heading: 'League Spartan', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-body: 'Quicksand', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --max-width: 1100px;
    --header-height: 80px;
}

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

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Header / Navigation ──────────────────────────────────────────────── */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    height: var(--header-height);
}

.site-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--color-text);
    text-decoration: none;
    text-transform: uppercase;
}

.site-name:hover {
    color: var(--color-text);
}

.site-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--color-text-light);
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 0.25rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text);
}

.nav-link.active {
    border-bottom: 1.5px solid var(--color-text);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 28px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

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

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

.nav-toggle.open span:nth-child(1) {
    top: 9px;
    transform: rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
    top: 9px;
    transform: rotate(-45deg);
}

/* ─── Main Content ─────────────────────────────────────────────────────── */
.page-content {
    max-width: var(--max-width);
    margin: 2rem auto 4rem;
    padding: 0 2rem;
}

/* Layout with header image: two columns */
.page-content.with-image {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* Layout without image: single centered column */
.page-content.text-only {
    max-width: 700px;
}

.content-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.content-text {
    padding-top: 0.5rem;
}

/* ─── Typography ───────────────────────────────────────────────────────── */
.page-heading {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.content-text h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 2rem 0 1rem;
    line-height: 1.2;
}

.content-text h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 2rem 0 0.75rem;
    line-height: 1.3;
}

.content-text h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
}

.content-text h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem;
}

.content-text p {
    margin-bottom: 1.25rem;
    color: var(--color-text);
    line-height: 1.8;
    font-weight: 400;
}

.content-text a {
    color: var(--color-link);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.content-text a:hover {
    color: var(--color-link-hover);
}

.content-text strong {
    font-weight: 700;
}

.content-text em {
    font-style: italic;
}

.content-text ul,
.content-text ol {
    margin: 0 0 1.25rem 1.5rem;
}

.content-text li {
    margin-bottom: 0.4rem;
    line-height: 1.7;
}

.content-text blockquote {
    border-left: 3px solid var(--color-border);
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    color: var(--color-text-light);
    font-style: italic;
}

.content-text pre {
    background: #f5f5f5;
    padding: 1.25rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.content-text code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.9em;
}

.content-text p code {
    background: #f5f5f5;
    padding: 0.15em 0.4em;
    border-radius: 3px;
}

.content-text img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 2px;
}

.content-text hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 2rem 0;
}

/* ─── Footer ───────────────────────────────────────────────────────────── */
.site-footer {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.site-footer p {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--color-text-light);
    letter-spacing: 0.02em;
}

/* ─── Cookie Consent Banner ────────────────────────────────────────────── */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    color: #ffffff;
    padding: 1.25rem 2rem;
    z-index: 9999;
    font-family: var(--font-body);
    font-size: 0.9rem;
    display: none;
}

.cookie-banner.visible {
    display: block;
}

.cookie-banner-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    line-height: 1.6;
    min-width: 280px;
}

.cookie-banner-text a {
    color: #ffffff;
    text-underline-offset: 2px;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-btn {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.cookie-btn:hover {
    opacity: 0.85;
}

.cookie-btn-accept {
    background: #ffffff;
    color: #1a1a1a;
}

.cookie-btn-decline {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.4);
}

/* ─── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .site-header {
        padding: 0 1.25rem;
    }

    .site-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--color-bg);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1.5rem;
        z-index: 1000;
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav .nav-link {
        font-size: 1.2rem;
    }

    .nav-toggle {
        display: block;
    }

    .page-content {
        padding: 0 1.25rem;
        margin: 1rem auto 3rem;
    }

    .page-content.with-image {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .page-content.text-only {
        max-width: 100%;
    }

    .page-heading,
    .content-text h1 {
        font-size: 1.5rem;
    }

    .cookie-banner-inner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .cookie-banner-actions {
        justify-content: center;
    }
}
