/*
 * magdechat.de – statische Startseite. Farben wie in der App
 * (resources/css/app.css: magdeburg-*, magdeburg-red), Systemschriften,
 * keine externen Ressourcen. Mobile first, hell und dunkel.
 */

:root {
    color-scheme: light dark;

    --green-50: #e8f5ec;
    --green-100: #c5e6d0;
    --green-200: #8fd0a8;
    --green-300: #4eb87a;
    --green-400: #1ea957;
    --green-500: #009036;
    --green-600: #007a2d;
    --green-700: #006324;
    --green-800: #004c1c;
    --green-900: #003614;
    --red: #d4001a;

    --bg: #ffffff;
    --bg-soft: var(--green-50);
    --surface: #ffffff;
    --text: #171717;
    --text-muted: #525252;
    --text-subtle: #5f5f5f;
    --border: #e5e5e5;
    --accent: var(--green-600);
    --accent-strong: var(--green-700);
    --accent-text: var(--green-700);
    --accent-soft: var(--green-100);
    --on-accent: #ffffff;
    --heading-red: var(--red);
    --focus: var(--green-700);
    --success-bg: var(--green-50);
    --success-border: var(--green-300);
    --error-bg: #fdecee;
    --error-border: #f1a3ad;
    --error-text: #8f0012;
    --blob-a: rgba(78, 184, 122, 0.28);
    --blob-b: rgba(143, 208, 168, 0.28);

    --radius: 0.75rem;
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0a0a0a;
        --bg-soft: #0f1f14;
        --surface: #171717;
        --text: #f5f5f5;
        --text-muted: #d4d4d4;
        --text-subtle: #a3a3a3;
        --border: #262626;
        --accent: var(--green-400);
        --accent-strong: var(--green-300);
        --accent-text: var(--green-300);
        --accent-soft: rgba(0, 99, 36, 0.45);
        --on-accent: #0a0a0a;
        --heading-red: #ff5a6a;
        --focus: var(--green-300);
        --success-bg: rgba(0, 76, 28, 0.45);
        --success-border: var(--green-700);
        --error-bg: rgba(143, 0, 18, 0.35);
        --error-border: #b3001a;
        --error-text: #ffc2c9;
        --blob-a: rgba(0, 99, 36, 0.35);
        --blob-b: rgba(0, 76, 28, 0.25);
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
    }
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--bg);
    background-image:
        radial-gradient(28rem 28rem at 100% 0%, var(--blob-a), transparent 70%),
        radial-gradient(22rem 22rem at 0% 45%, var(--blob-b), transparent 70%),
        linear-gradient(to bottom, var(--bg-soft), var(--bg) 32rem);
    background-repeat: no-repeat;
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: var(--accent-text);
    text-underline-offset: 0.2em;
}

a:hover {
    text-decoration-thickness: 2px;
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
    border-radius: 4px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 10;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: var(--surface);
    color: var(--accent-text);
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.skip-link:focus {
    top: 1rem;
}

.container {
    width: 100%;
    max-width: 64rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header */

.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    padding-top: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.brand .tld {
    color: var(--accent-text);
}

.logo {
    width: 2.75rem;
    height: 2.75rem;
    color: var(--accent);
    flex: none;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--green-200);
    border-radius: 999px;
    background: var(--surface);
    background: color-mix(in srgb, var(--surface) 75%, transparent);
    color: var(--accent-text);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

@media (prefers-color-scheme: dark) {
    .pill {
        border-color: var(--green-800);
    }
}

.pill::before {
    content: "";
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 999px;
    background: var(--green-500);
}

/* Hero */

.hero {
    padding: 3.5rem 0 2.5rem;
    text-align: center;
}

.hero h1 {
    max-width: 44rem;
    margin: 1.5rem auto 0;
    font-size: clamp(2rem, 6vw, 3.25rem);
    line-height: 1.15;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.hero h1 .city {
    color: var(--accent-text);
}

.hero h1 .sources {
    color: var(--heading-red);
}

.lede {
    max-width: 40rem;
    margin: 1.5rem auto 0;
    color: var(--text-muted);
    font-size: 1.125rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid transparent;
    border-radius: 0.6rem;
    background: var(--accent);
    color: var(--on-accent);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 20px -8px rgba(0, 122, 45, 0.55);
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.button:hover {
    background: var(--accent-strong);
}

.button:active {
    transform: translateY(1px);
}

.button[disabled] {
    cursor: progress;
    opacity: 0.7;
}

/* Sections */

main > section {
    padding: 2.5rem 0;
}

.section-title {
    margin: 0;
    color: var(--text-subtle);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-intro {
    max-width: 42rem;
    margin: 0.5rem 0 0;
    color: var(--text-muted);
}

.fineprint {
    max-width: 42rem;
    margin: 1.25rem 0 0;
    color: var(--text-subtle);
    font-size: 0.875rem;
}

.cards {
    display: grid;
    gap: 1rem;
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 40rem) {
    .cards-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .cards-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.card {
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.card h3 {
    margin: 0.75rem 0 0;
    font-size: 1rem;
}

.card p {
    margin: 0.4rem 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.card .step {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: var(--accent-soft);
    color: var(--accent-text);
    font-weight: 700;
}

.questions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.hero .questions {
    justify-content: center;
    max-width: 40rem;
    margin: 1.75rem auto 0;
}

.questions li {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Waiting list */

.waitlist {
    display: grid;
    gap: 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--green-200);
    border-radius: 1rem;
    background: var(--surface);
    box-shadow: 0 12px 32px -16px rgba(0, 99, 36, 0.35);
}

@media (prefers-color-scheme: dark) {
    .waitlist {
        border-color: var(--green-800);
    }
}

@media (min-width: 48rem) {
    .waitlist {
        grid-template-columns: 1fr 1.2fr;
        padding: 2rem;
    }
}

.waitlist h2 {
    margin: 0.4rem 0 0;
    font-size: 1.6rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.waitlist-form {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.field label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.field input[type="email"] {
    width: 100%;
    min-height: 3rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid #8a8a8a;
    border-radius: 0.6rem;
    background: var(--bg);
    color: var(--text);
    font: inherit;
}

.field input[type="email"]:focus-visible {
    border-color: var(--accent);
    outline-offset: 1px;
}

.field input[aria-invalid="true"] {
    border-color: var(--red);
}

.consent {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: start;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.consent input {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0.15rem 0 0;
    accent-color: var(--accent);
}

/* Honeypot: invisible for people, still in the DOM for bots. */
.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.status {
    margin: 0;
    padding: 0.85rem 1rem;
    border: 1px solid var(--success-border);
    border-radius: 0.6rem;
    background: var(--success-bg);
    color: var(--text);
    font-size: 0.95rem;
}

.status[hidden] {
    display: none;
}

.status.is-error {
    border-color: var(--error-border);
    background: var(--error-bg);
    color: var(--error-text);
}

/* Status notices after the redirect of a plain form post (no JavaScript):
   the fragment #warteliste-<status> makes the matching notice visible. */
.notice {
    display: none;
}

.notice:target {
    display: block;
}

.js .notice:target {
    display: none;
}

/* Footer */

.site-footer {
    padding: 2.5rem 0 3rem;
    border-top: 1px solid var(--border);
    color: var(--text-subtle);
    font-size: 0.85rem;
    text-align: center;
}

.site-footer .stripes {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.site-footer .stripes span {
    width: 1.5rem;
    height: 0.375rem;
    border-radius: 999px;
    background: var(--green-500);
}

.site-footer .stripes span + span {
    background: var(--red);
}

.site-footer p {
    max-width: 40rem;
    margin: 0.5rem auto 0;
}

.site-footer nav a {
    color: inherit;
}

.site-footer nav a + a::before {
    content: "·";
    display: inline-block;
    margin: 0 0.6rem;
    color: var(--text-subtle);
}

/* Legal pages */

.legal {
    max-width: 46rem;
    padding: 2.5rem 0 3rem;
}

.legal h1 {
    margin: 0;
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    line-height: 1.2;
    letter-spacing: -0.015em;
}

.legal h2 {
    margin: 2.25rem 0 0.5rem;
    font-size: 1.2rem;
}

.legal h3 {
    margin: 1.5rem 0 0.4rem;
    font-size: 1rem;
}

.legal p,
.legal li {
    color: var(--text-muted);
}

.legal address {
    font-style: normal;
}

.placeholder {
    padding: 0 0.2em;
    border-radius: 0.25rem;
    background: #fff3b0;
    color: #3d3000;
    font-weight: 600;
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
}

.error-page {
    padding: 4rem 0;
    text-align: center;
}

.error-page h1 {
    margin: 1rem 0 0;
    font-size: clamp(1.75rem, 5vw, 2.5rem);
}

.error-page p {
    color: var(--text-muted);
}
