/*
  Layout & Typografie (lokal & legal, ohne externe Webfonts/CDNs)
  Wir nutzen System-Schriften, die i.d.R. lokal vorhanden sind:
  - Windows: Segoe UI
  - macOS: SF Pro (über -apple-system)
  - Linux: system-ui bzw. häufig Noto Sans / DejaVu Sans
*/

:root {
    /* Farben */
    --page-bg: #f3f4f6;
    --bg: #ffffff;
    --surface: #f9fafb;
    --text: #111827;
    --muted: #4b5563;

    --brand: #1e3a8a; /* Tiefes Blau */
    --link: #047857; /* ruhigeres Grün als #059669 */

    /* UI */
    --border: rgba(17, 24, 39, 0.12);
    --radius: 14px;
    --shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    font-family:
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        "Noto Sans",
        "Liberation Sans",
        Arial,
        sans-serif;

    margin: 0;
    padding: 0;

    background-color: var(--page-bg);
    color: var(--text);

    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* Footer auf kurzen Seiten nach unten drücken */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: var(--brand);
    color: #ffffff;

    padding: clamp(1.1rem, 2.5vw, 1.6rem) 1rem;
    text-align: center;
}

header p {
    margin: 0.25rem 0 0 0;
    color: rgba(255, 255, 255, 0.92);
}

/* Optional: wenn du im HTML die Unterzeile als <p class="subtitle"> setzt */
header .subtitle {
    margin: 0.25rem 0 0 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.92);
    opacity: 0.98;
}

main {
    max-width: 900px;
    margin: clamp(1rem, 3vw, 2rem) auto;
    padding: clamp(1.1rem, 2.8vw, 1.75rem);

    background-color: var(--bg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: var(--radius);

    /* nimmt den verfügbaren Platz ein, damit Footer unten bleibt */
    flex: 1;
}

h1 {
    color: #ffffff;
    font-size: clamp(1.5rem, 2.2vw, 1.85rem);
    letter-spacing: 0.2px;
    margin: 0.25rem 0;
    line-height: 1.2;
}

h2 {
    color: var(--text); /* wichtig: im Content nicht weiß */
    font-size: 1.25rem;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

h3 {
    color: var(--text);
    font-size: 1.05rem;
    margin: 1.25rem 0 0.5rem 0;
    line-height: 1.35;
}

.section {
    margin-bottom: 2rem;
}

.section + .section {
    padding-top: 1.25rem;
    margin-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.hero {
    margin-bottom: 2rem;
}

.hero p {
    margin-top: 0.25rem;
}

p {
    color: var(--muted);
    margin: 0.6rem 0;
}

ul {
    padding-left: 1.25rem;
    margin: 0.5rem 0 0 0;
    color: var(--muted);
}

li {
    margin: 0.25rem 0;
}

a {
    color: var(--link);
    text-decoration: none;
    font-weight: 600;
}

a:hover {
    text-decoration: underline;
}

a:focus-visible {
    outline: 3px solid rgba(4, 120, 87, 0.35);
    outline-offset: 3px;
    border-radius: 6px;
}

footer {
    text-align: center;
    margin: -1.1rem 0 1rem 0;
    color: var(--muted);
}

footer a {
    display: inline-block;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
}

footer a:hover {
    text-decoration: none;
    background: rgba(255, 255, 255, 1);
}

/* Dark mode (optional, aber "smarter" ohne zusätzlichen Aufwand) */
@media (prefers-color-scheme: dark) {
    :root {
        --page-bg: #0b1220;
        --bg: #0f172a;
        --surface: #0f172a;
        --text: #e5e7eb;
        --muted: #cbd5e1;

        --border: rgba(226, 232, 240, 0.14);
        --shadow: 0 12px 28px rgba(0, 0, 0, 0.35);

        --link: #34d399;
    }

    header p {
        color: rgba(255, 255, 255, 0.9);
    }

    footer a {
        background: rgba(15, 23, 42, 0.8);
    }

    footer a:hover {
        background: rgba(15, 23, 42, 1);
    }
}
