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

:root {
    --spd-red:   #E3000F;
    --spd-dark:  #B5000C;
    --text:      #1a1a1a;
    --muted:     #555;
    --border:    #d0d0d0;
    --bg:        #ffffff;
    --bg-light:  #f7f7f7;
    --error-bg:  #fff0f0;
    --error-txt: #c0000a;
    --success-bg:#f0fff4;
    --success-txt:#1a6b35;
    --radius:    4px;
    --max-w:     720px;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Header ───────────────────────────────────────────── */
.site-header {
    background: var(--spd-red);
    color: #fff;
}
.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: #fff;
}
.site-logo img {
    height: 2.2rem;
    width: auto;
    filter: brightness(0) invert(1);
}
.site-name {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.site-nav {
    display: flex;
    gap: 1.25rem;
}
.site-nav a {
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    font-size: 0.9rem;
}
.site-nav a:hover,
.site-nav a.active {
    color: #fff;
    text-decoration: underline;
}

/* ── Main ─────────────────────────────────────────────── */
.site-main {
    flex: 1;
    max-width: var(--max-w);
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ── Footer ───────────────────────────────────────────── */
.site-footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--muted);
}
.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    align-items: center;
    text-align: center;
}
.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--text); }
.footer-copy { font-size: 0.8rem; }

/* ── Intro copy ───────────────────────────────────────── */
.intro { margin-bottom: 2rem; }
.intro h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--spd-red);
    margin-bottom: 0.75rem;
    line-height: 1.25;
}
.intro p { margin-bottom: 0.75rem; color: var(--muted); }

/* ── Form ─────────────────────────────────────────────── */
.signup-form {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-group { margin-bottom: 1.1rem; }
.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group select {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.15s;
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--spd-red);
    box-shadow: 0 0 0 2px rgba(227,0,15,0.12);
}
.form-group input.is-invalid,
.form-group select.is-invalid {
    border-color: var(--error-txt);
}
.field-error {
    color: var(--error-txt);
    font-size: 0.82rem;
    margin-top: 0.25rem;
}

/* Sonstige field hidden by default */
#sonstige-group { display: none; }

/* Consent */
.consent-group {
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.consent-group label {
    display: flex;
    gap: 0.6rem;
    font-size: 0.9rem;
    cursor: pointer;
}
.consent-group input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
    accent-color: var(--spd-red);
    width: 1rem;
    height: 1rem;
}
.consent-group.is-invalid {
    border-color: var(--error-txt);
    background: var(--error-bg);
}

/* Submit button */
.btn-submit {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background: var(--spd-red);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s;
}
.btn-submit:hover { background: var(--spd-dark); }

/* Links below form */
.form-legal {
    margin-top: 0.75rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--muted);
}
.form-legal a { color: var(--muted); }
.form-legal a:hover { color: var(--text); }

/* ── Status pages (danke, confirm, error) ─────────────── */
.status-box {
    max-width: 520px;
    margin: 0 auto;
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: center;
}
.status-box h1 { font-size: 1.5rem; margin-bottom: 1rem; }
.status-box p  { color: var(--muted); margin-bottom: 0.75rem; }
.status-box a  { color: var(--spd-red); }

.status-box.success {
    background: var(--success-bg);
    border-color: var(--success-txt);
}
.status-box.success h1 { color: var(--success-txt); }

.status-box.error {
    background: var(--error-bg);
    border-color: var(--error-txt);
}
.status-box.error h1 { color: var(--error-txt); }

.status-box.info {
    background: var(--bg-light);
}

/* ── Legal pages ──────────────────────────────────────── */
.legal-content h1 { font-size: 1.6rem; margin-bottom: 1.5rem; color: var(--spd-red); }
.legal-content h2 { font-size: 1.1rem; font-weight: 700; margin: 1.5rem 0 0.5rem; }
.legal-content p  { margin-bottom: 0.75rem; color: var(--muted); }
.legal-content ul { padding-left: 1.4rem; margin-bottom: 0.75rem; color: var(--muted); }
.legal-content li { margin-bottom: 0.25rem; }
.legal-content address { font-style: normal; color: var(--muted); }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 540px) {
    .form-row { grid-template-columns: 1fr; }
    .header-inner { flex-direction: column; align-items: flex-start; }
    .site-nav { gap: 0.75rem; }
    .signup-form { padding: 1.25rem; }
    .intro h1 { font-size: 1.4rem; }
}
