/**
 * „Mitglied werden" — views/mitglied_werden.ejs (Betreiberentscheidung
 * 25.10.2026: öffentliche Seiten, die Nicht-Mitglieder zu Mitgliedern machen).
 *
 * Die Seite steht im Saal wie jede andere (Hallenfoto, Lüsterlicht über dem
 * Titel, Kopfzeile, Fuß — nichts davon hier). Eigen ist nur DER WEG HINEIN:
 * drei Stationen und als vierte die erste Stufe der Leiter, verbunden durch
 * dieselbe gestrichelte Messing-Spur wie die Reisekarte der Startseite
 * (pages/rangleiter.css). Der Weg in den Server mündet sichtbar in den Weg
 * durch die Ränge. Am Handy steht er senkrecht.
 *
 * Das Programm darunter ist der gemeinsame Baustein .jt-programm
 * (bausteine.css). Werte kommen aus public/css/tokens.css; wörtlich stehen nur
 * die Lichtstufen der Plaketten, wie in rangleiter.css.
 *
 * Bewegung: einmal je Besuch (Merker html.jt-auftritt, Wahlzettel F4-B) laufen
 * die Stationen nacheinander ein; bei „weniger Bewegung" steht alles still.
 */

.mw-seite {
    display: flex;
    flex-direction: column;
    gap: clamp(28px, 4.4vw, 48px);
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* Die Mitgliederzahl unter dem Titel (jbHeroMeta). */
.mw-zahl {
    margin: 0;
    color: var(--jt-text-leise);
    font-size: 0.92rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.mw-zahl b {
    font-family: var(--jt-schrift-wert);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--jt-messing-hell);
}

/* Abschnittsköpfe: Messing-Inschrift zwischen zwei Linien — wie die
   Abschnitte der Startseite (leaderboard.css, .lb-dash__section-title). */
.mw-seite .mw-titel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 0 0 var(--jt-a-6);
    font-family: var(--jt-schrift-alt);
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--jt-messing-hell);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 16px rgba(0, 0, 0, 0.7);
}

.mw-seite .mw-titel::before,
.mw-seite .mw-titel::after {
    content: "";
    flex: 0 1 90px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--jt-messing-rgb), 0.7));
}

.mw-seite .mw-titel::after { transform: scaleX(-1); }

/* ── Der Weg hinein ────────────────────────────────────────────────────── */
/* Eigene Fläche — ohne sie scheint das Hallenfoto durch (wie die Leiter).
   ::after bleibt frei für den Saison-Schmuck (saison.css). */
.mw-weg {
    position: relative;
    padding: clamp(22px, 3.4vw, 36px) clamp(16px, 3vw, 32px) clamp(18px, 3vw, 26px);
    border-radius: var(--jt-r-l);
    background:
        radial-gradient(60% 40% at 50% 0%, rgba(255, 214, 140, 0.12), transparent 70%),
        var(--jt-samt);
    box-shadow: inset 0 0 0 1px rgba(var(--jt-messing-rgb), 0.22), 0 26px 60px -16px rgba(0, 0, 0, 0.72);
    isolation: isolate;
}

.mw-weg__liste {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mw-station {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 0 4px;
    text-align: center;
}

/* Die Spur zur nächsten Station — gestrichelt wie auf der Reisekarte, durch
   die Mitte der Marke (64 px hoch, Linie 4 px: oben bei 30 px). */
.mw-station::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 30px;
    left: 50%;
    width: calc(100% + 18px);
    height: 4px;
    border-radius: 2px;
    background: repeating-linear-gradient(90deg, rgba(var(--jt-messing-rgb), 0.4) 0 10px, transparent 10px 16px);
}

.mw-station--ziel::before { display: none; }

/* Die Marke: die Nummer in der Schrift der Platzzahlen (Cinzel), in einer
   Messing-Fassung wie die Wappen der Leiter. */
.mw-station__marke {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    flex: none;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 35%, #2b241c, #0d0a08 75%);
    box-shadow: 0 0 0 3px #0d0a08, 0 0 0 5px var(--jt-messing), 0 10px 20px rgba(0, 0, 0, 0.6);
    font-family: var(--jt-schrift-rang);
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1;
    color: var(--jt-messing-hell);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

/* Die vierte Station ist Stufe 1 der Leiter: ihr Wappen, grau wie jede noch
   nicht erreichte Stufe, der Ring in der Rollenfarbe (Betreiber 15.10., K6). */
.mw-station__marke--wappen {
    box-shadow: 0 0 0 3px #0d0a08, 0 0 0 5px var(--rang-farbe, var(--jt-messing)), 0 10px 20px rgba(0, 0, 0, 0.6);
}

.mw-station__marke--wappen img {
    display: block;
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: grayscale(1) brightness(0.85);
}

/* Erledigt (eingeloggt): der Ring leuchtet, die Spur von hier ist gold. */
.mw-station.is-erledigt .mw-station__marke {
    box-shadow: 0 0 0 3px #0d0a08, 0 0 0 5px var(--jt-messing-hell), 0 0 24px rgba(var(--jt-messing-hell-rgb), 0.45), 0 10px 20px rgba(0, 0, 0, 0.6);
    color: var(--jt-creme);
}

/* Das fehlt noch (eingeloggt, nicht im Server): aussen der orange Kreis —
   Orange heisst „du", wie „Du bist hier" auf der Leiter. */
.mw-station.is-fehlt .mw-station__marke {
    box-shadow:
        0 0 0 3px #0d0a08,
        0 0 0 5px var(--jt-messing),
        0 0 0 7px #0d0a08,
        0 0 0 9px var(--jt-orange),
        0 0 30px rgba(var(--jt-orange-rgb), 0.5);
}

.mw-station__inhalt {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.mw-seite .mw-station__titel {
    margin: 0;
    font-family: var(--jt-schrift-alt);
    font-size: 1.14rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--jt-creme);
}

.mw-seite .mw-station__text {
    max-width: 30ch;
    margin: 0;
    color: var(--jt-text-leise);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Kurze Hinweise unter dem Satz eines Schritts — leiser als der Satz. */
.mw-station__tipps {
    display: grid;
    gap: 6px;
    max-width: 32ch;
    margin: 2px 0 0;
    padding: 0;
    list-style: none;
}

.mw-seite .mw-station__tipps li {
    padding: 6px 10px;
    border-radius: var(--jt-r-s);
    background: rgba(var(--jt-grund-rgb), 0.55);
    box-shadow: inset 0 0 0 1px rgba(var(--jt-messing-rgb), 0.14);
    color: var(--jt-text-leise);
    font-size: 0.8rem;
    line-height: 1.45;
}

.mw-station__adresse {
    margin: 0;
    font-family: var(--jt-schrift-wert);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--jt-messing-hell);
    overflow-wrap: anywhere;
}

/* Die Aktion steht unten — in jeder Spalte auf derselben Höhe. */
.mw-station__aktion {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 6px;
}

/* inline-block, nicht flex: Bricht der Text in der schmalen Spalte um, bleibt
   das Zeichen am Text statt allein links daneben zu stehen (Foto 25.10.). */
.mw-seite .mw-station__link {
    display: inline-block;
    padding: 9px 0;
    text-align: center;
    text-wrap: balance;
    font-size: 0.88rem;
    line-height: 1.45;
    font-weight: 700;
    color: var(--jt-messing-hell);
    text-decoration: underline;
    text-decoration-color: rgba(var(--jt-messing-rgb), 0.5);
    text-underline-offset: 4px;
}

.mw-seite .mw-station__link:hover { color: var(--jt-creme); }

.mw-seite .mw-station__stand {
    margin: 0;
    color: var(--jt-creme);
    font-size: 0.9rem;
    font-weight: 700;
}

.mw-station__stand i { color: var(--jt-messing-hell); }

.mw-seite .mw-weg__echt {
    margin: var(--jt-a-6) 0 0;
    color: var(--jt-text-leise);
    font-size: 0.86rem;
    line-height: 1.5;
    text-align: center;
}

.mw-weg__echt i { color: var(--jt-messing); }
.mw-weg__echt b { color: var(--jt-text); font-family: var(--jt-schrift-wert); }

.mw-seite .mw-weg__echt a,
.mw-seite .mw-wissen__punkt a {
    color: var(--jt-messing-hell);
    text-decoration: underline;
    text-decoration-color: rgba(var(--jt-messing-rgb), 0.5);
    text-underline-offset: 3px;
}

.mw-seite .mw-weg__echt a:hover,
.mw-seite .mw-wissen__punkt a:hover { color: var(--jt-creme); }

/* ── Schon Mitglied ────────────────────────────────────────────────────── */
.mw-drin {
    padding: clamp(22px, 3.4vw, 34px);
    border-radius: var(--jt-r-l);
    background: var(--jt-samt);
    box-shadow: inset 0 0 0 1px rgba(var(--jt-messing-rgb), 0.24), 0 26px 60px -16px rgba(0, 0, 0, 0.72);
    text-align: center;
}

.mw-seite .mw-drin__titel {
    margin: 0 0 var(--jt-a-2);
    font-family: var(--jt-schrift-alt);
    font-size: clamp(1.3rem, 2.6vw, 1.7rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--jt-creme);
}

.mw-drin__titel i { color: var(--jt-messing-hell); }

.mw-seite .mw-drin__text {
    margin: 0 0 var(--jt-a-4);
    color: var(--jt-text-leise);
}

.mw-drin__aktionen {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--jt-a-3);
}

/* ── Die Kanäle unter dem Programm ─────────────────────────────────────── */
.mw-kanaele {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: var(--jt-a-4);
    padding-top: var(--jt-a-4);
    border-top: 1px solid rgba(var(--jt-messing-rgb), 0.14);
}

.mw-kanaele__titel {
    margin-right: 4px;
    font-family: var(--jt-schrift-alt);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--jt-messing);
}

/* ── Gut zu wissen ─────────────────────────────────────────────────────── */
.mw-wissen__liste {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--jt-a-4);
    margin: 0;
    padding: 0;
    list-style: none;
}

.mw-wissen__punkt {
    padding: 18px 20px;
    border-radius: var(--jt-r-m);
    background: rgba(var(--jt-grund-rgb), 0.72);
    box-shadow: inset 0 0 0 1px rgba(var(--jt-messing-rgb), 0.16);
}

.mw-seite .mw-wissen__name {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 6px;
    font-family: var(--jt-schrift-text);
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--jt-text);
}

.mw-wissen__name i { color: var(--jt-messing); }

.mw-seite .mw-wissen__punkt p {
    margin: 0;
    color: var(--jt-text-leise);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ── Auftritt: einmal je Besuch läuft der Weg Station für Station ein ──── */
html.jt-auftritt .mw-station { animation: mwStationAuftritt 0.52s var(--jt-kurve) both; }
html.jt-auftritt .mw-station:nth-child(2) { animation-delay: 0.12s; }
html.jt-auftritt .mw-station:nth-child(3) { animation-delay: 0.24s; }
html.jt-auftritt .mw-station:nth-child(4) { animation-delay: 0.36s; }

@keyframes mwStationAuftritt {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

/* ── Handy: der Weg steht senkrecht ────────────────────────────────────── */
@media (max-width: 760px) {
    /* Die Inschrift bricht sonst bei 420 px um („DER WEG / HINEIN", Foto 25.10.). */
    .mw-seite .mw-titel { gap: 10px; letter-spacing: 0.18em; white-space: nowrap; }
    .mw-seite .mw-titel::before,
    .mw-seite .mw-titel::after { flex-basis: 40px; }

    .mw-weg__liste { grid-template-columns: minmax(0, 1fr); }

    .mw-station {
        flex-direction: row;
        align-items: flex-start;
        gap: 16px;
        padding: 0 0 26px;
        text-align: left;
    }

    .mw-station--ziel { padding-bottom: 0; }

    /* Die Spur läuft senkrecht von Marke zu Marke (52 px, Linie 4 px: links bei 24 px). */
    .mw-station::before {
        top: 60px;
        bottom: 6px;
        left: 24px;
        width: 4px;
        height: auto;
        background: repeating-linear-gradient(180deg, rgba(var(--jt-messing-rgb), 0.4) 0 10px, transparent 10px 16px);
    }

    .mw-station__marke { width: 52px; height: 52px; font-size: 1.4rem; }
    .mw-station__marke--wappen img { width: 36px; height: 36px; }

    .mw-station__inhalt { align-items: flex-start; padding-top: 4px; }
    .mw-seite .mw-station__text,
    .mw-station__tipps { max-width: none; }
    .mw-station__aktion { align-items: flex-start; margin-top: 4px; }
    .mw-seite .mw-station__link { text-align: left; }

    .mw-wissen__liste { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    html.jt-auftritt .mw-station { animation: none; }
}
