/*
 * Formulare der alten Nemeton-Landeseite auf /nemeton/ und /en/nemeton/ (24.11.2026).
 * Beta-Anmeldung, Launch-Updates, Pilot-Anfrage. Nur Token aus css/neu.css, keine eigenen Farben.
 * Erzeugt von tools/neubau/nemeton_formulare.py, Logik in js/nemeton-formulare.js.
 *
 * Kontraste (Text 4,5:1, Feldrand 3:1): --text/--muted/--err/--acc-text auf --bg siehe neu.css.
 * Kein Layout-Sprung: Turnstile-Platz (65 px, Größe „flexible“) und Statuszeile sind vorab reserviert.
 */

.nf-cards {
    display: grid;
    gap: 1rem;
}

@media (min-width: 900px) {
    .nf-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem;
        align-items: start;
    }
}

.nf-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
    padding: 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--bg);
    box-shadow: var(--shadow);
}

@media (min-width: 640px) {
    .nf-card {
        padding: 2rem;
    }
}

.nf-card h3 {
    color: var(--head);
    font-size: 1.25rem;
    font-weight: 600;
}

.nf-card > p {
    color: var(--muted);
}

.nf-form {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-top: 0.25rem;
}

.nf-field label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

.nf-field input,
.nf-field textarea {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 0.625rem 0.75rem;
    border: 1.5px solid var(--muted);   /* Feldrand 3:1 (WCAG 1.4.11) */
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: 1rem;
}

.nf-field textarea {
    min-height: 8rem;
    resize: vertical;
}

.nf-field input::placeholder,
.nf-field textarea::placeholder {
    color: var(--muted);
    opacity: 1;
}

.nf-field input:focus-visible,
.nf-field textarea:focus-visible,
.nf-consent input:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.nf-field [aria-invalid="true"] {
    border-color: var(--err);
    border-width: 2px;
}

.nf-consent input[aria-invalid="true"] {
    outline: 2px solid var(--err);
    outline-offset: 2px;
}

.nf-form .btn {
    align-self: flex-start;
}

.nf-form .btn:disabled {
    opacity: 0.6;
    cursor: progress;
}

@media (max-width: 479px) {
    .nf-form .btn {
        align-self: stretch;
    }
}

.nf-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Turnstile lädt erst, wenn jemand das Formular berührt: Platz vorab freihalten.
   line-height 0: sonst setzt die Grundlinie unter das Widget-iframe 7 px drauf (gemessen 72 statt 65). */
.nf-turnstile {
    min-height: 65px;
    line-height: 0;
}

.nf-consent {
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--muted);
}

.nf-consent input {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0.0625rem 0 0;
    accent-color: var(--acc);
}

.nf-consent a,
.nf-talk a {
    color: var(--text);
    font-weight: 600;
    text-decoration: underline;
}

.nf-status {
    min-height: 1.5em;
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
}

.nf-status--ok {
    color: var(--acc-text);
}

.nf-status--err {
    color: var(--err);
}

.nf-fine {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--muted);
}

.nf-fine--section {
    max-width: 46rem;
    margin-top: 1.5rem;
}

/* Pilot-Anfrage: Text links, Formular rechts */
.nf-split {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 900px) {
    .nf-split {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 3rem;
        align-items: start;
    }
}

.nf-split-text {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.nf-split-text h2 {
    color: var(--head);
    font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
    font-weight: 600;
}

.nf-split-text p {
    color: var(--muted);
    font-size: 1.0625rem;
}

.nf-split-text .nf-talk {
    color: var(--text);
}

.nf-talk a {
    display: inline-block;
    padding-block: 0.5rem;   /* Zielgröße 24 px (WCAG 2.5.8) */
}

/* Anker unter dem klebenden Kopf nicht verstecken */
.nf[id],
.nf-card[id] {
    scroll-margin-top: 5.5rem;
}
