/* MailWerk Landingpage — Farbwelt und Radien entsprechen dem App-Theme
   (MailWerkTheme.cs): Primär #1E3A5F, AppBar #122A47, Flächen #F4F6F9/#FFF. */

:root {
    --primary: #1E3A5F;
    --secondary: #3D6098;
    --tertiary: #5E80A6;
    --appbar: #122A47;
    --appbar-text: #FFFFFF;
    --background: #F4F6F9;
    --surface: #FFFFFF;
    --text: #1C2733;
    --text-secondary: #5C6B7A;
    --success: #2E7D32;
    --warning: #B26A00;
    --lines: #E1E6EB;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(18, 42, 71, 0.10), 0 1px 2px rgba(18, 42, 71, 0.06);
    --shadow-lg: 0 10px 30px rgba(18, 42, 71, 0.12);
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary: #6B93C4;
        --secondary: #88A9CE;
        --tertiary: #5E80A6;
        --appbar: #0E1E33;
        --appbar-text: #E4E9EF;
        --background: #12181F;
        --surface: #1B232C;
        --text: #E2E8EE;
        --text-secondary: #9AA7B5;
        --success: #4CAF50;
        --warning: #E0A030;
        --lines: #2A3542;
        --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.45);
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--background);
    line-height: 1.6;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Kopfzeile (wie die App-AppBar) ---------- */
.site-header {
    background: var(--appbar);
    color: var(--appbar-text);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: var(--shadow);
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 64px;
    flex-wrap: wrap;
    padding-top: 8px;
    padding-bottom: 8px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--appbar-text);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
}

.brand svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.brand .claim {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.6;
}

.site-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.site-nav a {
    color: var(--appbar-text);
    text-decoration: none;
    font-size: 0.95rem;
    opacity: 0.85;
}

.site-nav a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ---------- Responsive Navigation (Hamburger, Off-Canvas von links) ---------- */
.nav-toggle-box {
    display: none;
}

.nav-toggle {
    display: none;
}

@media (max-width: 920px) {
    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        margin-left: auto;
        padding: 10px;
        cursor: pointer;
        border-radius: var(--radius);
    }

    .nav-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        background: var(--appbar-text);
        border-radius: 2px;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .nav-toggle-box:checked ~ .nav-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle-box:checked ~ .nav-toggle span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle-box:checked ~ .nav-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .site-nav {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(300px, 82vw);
        margin: 0;
        padding: 76px 20px 24px;
        background: var(--appbar);
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: var(--shadow-lg);
        z-index: 120;
    }

    .site-nav a {
        display: block;
        padding: 12px 14px;
        border-radius: var(--radius);
        font-size: 1.05rem;
        opacity: 1;
    }

    .site-nav a:hover {
        background: rgba(255, 255, 255, 0.10);
        text-decoration: none;
    }

    .site-nav .btn-outline {
        margin-top: 16px;
        text-align: center;
    }

    .nav-toggle-box:checked ~ .site-nav {
        transform: translateX(0);
    }

    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 110;
        cursor: pointer;
    }

    .nav-toggle-box:checked ~ .nav-overlay {
        display: block;
    }
}

/* ---------- Sprachumschalter (normale ↔ einfache Sprache) ---------- */
.lang-switch {
    background: var(--surface);
    border-bottom: 1px solid var(--lines);
    font-size: 0.9rem;
}

.lang-switch .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 10px;
    padding-bottom: 10px;
    text-align: center;
}

.lang-switch a {
    color: var(--primary);
    font-weight: 600;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    border-radius: var(--radius);
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
    background: var(--primary);
    color: #FFFFFF;
    box-shadow: var(--shadow);
}

@media (prefers-color-scheme: dark) {
    .btn-primary {
        color: #0E1E33;
    }
}

.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    border: 1px solid var(--appbar-text);
    color: var(--appbar-text);
    padding: 8px 20px;
    font-size: 0.9rem;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.1rem;
}

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(160deg, var(--appbar) 0%, var(--primary) 70%, var(--secondary) 100%);
    color: #FFFFFF;
    padding: 88px 0 96px;
    text-align: center;
}

.hero h1 {
    font-size: clamp(1.8rem, 4.5vw, 3rem);
    line-height: 1.2;
    max-width: 860px;
    margin: 0 auto 20px;
}

.hero .subline {
    font-size: clamp(1rem, 2vw, 1.25rem);
    max-width: 720px;
    margin: 0 auto 36px;
    opacity: 0.9;
}

.hero .cta-note {
    margin-top: 14px;
    font-size: 0.9rem;
    opacity: 0.75;
}

/* ---------- Abschnitte ---------- */
section {
    padding: 72px 0;
}

section h2 {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    text-align: center;
    margin-bottom: 12px;
    color: var(--text);
}

section .section-intro {
    text-align: center;
    color: var(--text-secondary);
    max-width: 720px;
    margin: 0 auto 48px;
}

/* Karten wie MudPaper */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--lines);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.card h3 {
    font-size: 1.15rem;
    margin: 14px 0 8px;
    color: var(--text);
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.card .icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card .icon svg {
    width: 24px;
    height: 24px;
    fill: #FFFFFF;
}

@media (prefers-color-scheme: dark) {
    .card .icon svg {
        fill: #0E1E33;
    }
}

/* ---------- Schritte ---------- */
.steps {
    background: var(--surface);
    border-top: 1px solid var(--lines);
    border-bottom: 1px solid var(--lines);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
    counter-reset: step;
}

.step {
    text-align: center;
    padding: 12px;
}

.step .step-number {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--primary);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
}

@media (prefers-color-scheme: dark) {
    .step .step-number {
        color: #0E1E33;
    }
}

.step h3 {
    margin-bottom: 8px;
}

.step p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ---------- Beispiel-Regel ---------- */
.rule-example {
    background: var(--surface);
    border: 1px solid var(--lines);
    border-left: 4px solid var(--success);
    border-radius: var(--radius);
    padding: 24px 28px;
    max-width: 780px;
    margin: 0 auto;
    box-shadow: var(--shadow);
}

.rule-example code {
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.95rem;
    color: var(--text);
    display: block;
    line-height: 1.8;
}

.rule-example .kw {
    color: var(--primary);
    font-weight: 700;
}

/* ---------- Trial-Banner ---------- */
.trial {
    text-align: center;
}

.trial .trial-box {
    background: linear-gradient(160deg, var(--primary), var(--secondary));
    color: #FFFFFF;
    border-radius: var(--radius);
    padding: 56px 32px;
    box-shadow: var(--shadow-lg);
}

.trial h2 {
    color: #FFFFFF;
}

.trial p {
    max-width: 640px;
    margin: 0 auto 32px;
    opacity: 0.92;
}

.trial ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
    margin-bottom: 36px;
    padding: 0;
}

.trial li {
    font-size: 0.95rem;
}

.trial li::before {
    content: "\2713\0020";
    font-weight: 700;
}

/* Auf dem blauen Verlauf braucht der CTA eine helle Fläche (sonst blau auf blau). */
.trial .btn-primary {
    background: #FFFFFF;
    color: var(--primary);
}

.trial .btn-primary:hover {
    background: #F4F6F9;
}

/* ---------- FAQ ---------- */
.faq details {
    background: var(--surface);
    border: 1px solid var(--lines);
    border-radius: var(--radius);
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.faq summary {
    cursor: pointer;
    padding: 18px 24px;
    font-weight: 600;
    list-style: none;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    float: right;
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.faq details[open] summary::after {
    content: "\2013";
}

.faq details p {
    padding: 0 24px 18px;
    color: var(--text-secondary);
}

/* ---------- Fußzeile ---------- */
.site-footer {
    background: var(--appbar);
    color: var(--appbar-text);
    padding: 40px 0;
    font-size: 0.9rem;
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.site-footer nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.site-footer a {
    color: var(--appbar-text);
    opacity: 0.85;
    text-decoration: none;
}

.site-footer a:hover {
    opacity: 1;
    text-decoration: underline;
}

.site-footer .copyright {
    opacity: 0.6;
}

/* ---------- Unterseiten (Impressum, Datenschutz, Haftungsausschluss) ---------- */
.legal {
    padding: 56px 0 72px;
}

.legal .card {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 48px;
}

.legal h1 {
    font-size: 1.9rem;
    margin-bottom: 24px;
}

.legal h2 {
    font-size: 1.25rem;
    text-align: left;
    margin: 32px 0 10px;
}

.legal h3 {
    font-size: 1.05rem;
    margin: 22px 0 8px;
}

.legal p,
.legal li {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.legal ul {
    padding-left: 22px;
}

.legal a {
    color: var(--primary);
}

.legal address {
    font-style: normal;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

/* ---------- Blog ---------- */
.article {
    padding: 56px 0 72px;
}

.article .card {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 48px;
}

.article h1 {
    font-size: 1.9rem;
    line-height: 1.25;
    margin-bottom: 8px;
}

.article .meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 28px;
}

.article h2 {
    font-size: 1.35rem;
    text-align: left;
    margin: 34px 0 10px;
}

.article h3 {
    font-size: 1.05rem;
    margin: 24px 0 8px;
}

.article p,
.article li {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.article ul,
.article ol {
    padding-left: 22px;
    margin-bottom: 12px;
}

.article a {
    color: var(--primary);
}

/* Buttons in Artikeln/Rechtsseiten: .article a bzw. .legal a würden sonst die
   Button-Schriftfarbe überschreiben (blau auf blau). */
.article a.btn-primary,
.legal a.btn-primary {
    color: #FFFFFF;
}

@media (prefers-color-scheme: dark) {
    .article a.btn-primary,
    .legal a.btn-primary {
        color: #0E1E33;
    }
}

.article .tip {
    background: var(--background);
    border-left: 4px solid var(--success);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin: 18px 0;
}

.article .tip strong {
    color: var(--text);
}

.article .cta-inline {
    text-align: center;
    margin-top: 36px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.blog-grid .card h3 {
    margin-top: 0;
}

.blog-grid .card a.stretched {
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-grid .read-more {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* In-Text-Links auf Landingpage-Abschnitten (Karten, Schritte, FAQ) —
   ohne diese Regel fielen sie auf das Browser-Blau zurück. */
main section a:not(.btn) {
    color: var(--primary);
}

/* ---------- Einladungsformular (freunde-werben.html) ---------- */
.invite-form {
    max-width: 560px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--lines);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    text-align: left;
}

.invite-form label {
    display: block;
    font-weight: 600;
    margin: 18px 0 6px;
}

.invite-form label:first-child {
    margin-top: 0;
}

.invite-form input[type="email"],
.invite-form input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--lines);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
}

.invite-form input:focus {
    outline: 2px solid var(--secondary);
    outline-offset: 1px;
}

.invite-form .consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 18px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.invite-form .consent input {
    margin-top: 4px;
}

.invite-form .btn {
    width: 100%;
    margin-top: 6px;
}

.invite-form .form-note {
    margin-top: 14px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

/* ---------- Autor-Box + Trust-Leiste (E-E-A-T) ---------- */
.author-box {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--background);
    border: 1px solid var(--lines);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-top: 36px;
}

.author-box .avatar {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--primary);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

@media (prefers-color-scheme: dark) {
    .author-box .avatar {
        color: #0E1E33;
    }
}

.author-box h3 {
    margin: 0 0 4px;
    font-size: 1rem;
}

.author-box p {
    margin: 0;
    font-size: 0.9rem;
}

.trust-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    justify-content: center;
    margin: 24px 0 0;
    padding: 14px 18px;
    background: var(--background);
    border: 1px solid var(--lines);
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.trust-bar span::before {
    content: "\2713\0020";
    color: var(--success);
    font-weight: 700;
}

@media (max-width: 640px) {
    .legal .card,
    .article .card {
        padding: 28px 20px;
    }

    .site-footer .container {
        flex-direction: column;
        text-align: center;
    }
}
