/* =====================================================================================================================
   Website-Wechsler „IT-Jäger · ALL-WORKS · Prüfmeister“ – gemeinsamer Baustein für it-jaeger.support, all-works.com
   und pruefmeister.de. QUELLE: werkzeuge/website-wechsler/ (LIESMICH.md) – auf allen drei Websites unverändert als
   assets/wechsler.css einbinden; Anpassungen je Website nur in deren site.css (Farbvariablen --vb-…, Abstände).
   Fassung 2: echte Markenzeichen (die Website-Symbole als data:-Bilder, CSP img-src 'self' data:), Leuchtlinie in der
   Markenfarbe unter der aktuellen Website, Pfeil ↗ an den anderen beiden, Lichtimpuls vom Titel zum Schalter.
   Dunkle Grundfassung (für dunkle Köpfe); helle Fassung mit der Klasse .wechsler.hell oder eigenen --vb-… in der site.css.
   Eigene Variablen heißen nur --vb-… (nie --x/--w: eine registrierte @property gleichen Namens auf einer Website würde sie
   umdeuten). Eigene Fläche --vb-flaeche setzt die Leiste leicht vom Menü darunter ab. Ohne JavaScript bleibt die aktuelle
   Website markiert, nur das Gleiten fehlt.
   ===================================================================================================================== */
:root { --wechsler-h: 38px; }

.wechsler {
    --vb-text: rgba(255, 255, 255, .7);
    --vb-text-stark: #fff;
    --vb-aktiv-text: #fff;
    --vb-grund: rgba(255, 255, 255, .045);
    --vb-rahmen: rgba(255, 255, 255, .12);
    --vb-hauch: rgba(255, 255, 255, .07);
    --vb-band: linear-gradient(180deg, rgba(255, 255, 255, .17), rgba(255, 255, 255, .06));
    --vb-linie: rgba(255, 255, 255, .08);
    --vb-kante: rgba(255, 255, 255, .2);
    --vb-flaeche: rgba(0, 0, 0, .22);
    position: relative; height: var(--wechsler-h); border-bottom: 1px solid var(--vb-linie); background: var(--vb-flaeche);
}
.wechsler.hell {
    --vb-text: #4a6070;
    --vb-text-stark: #0c2230;
    --vb-aktiv-text: #fff;
    --vb-grund: rgba(5, 47, 67, .045);
    --vb-rahmen: rgba(5, 47, 67, .13);
    --vb-hauch: rgba(5, 47, 67, .08);
    --vb-band: linear-gradient(180deg, #123f56, #062c3f);
    --vb-linie: rgba(5, 47, 67, .08);
    --vb-kante: rgba(255, 255, 255, .14);
    --vb-flaeche: rgba(5, 47, 67, .05);
}
/* Farbe der eigenen Website (Lichtimpuls) */
[data-wechsler="itjaeger"] { --vb-eigen: #ff3b2f; }
[data-wechsler="allworks"] { --vb-eigen: #8b5cff; }
[data-wechsler="pruefmeister"] { --vb-eigen: #1b8fd6; }

/* Titel links, Haarlinie mit Lichtimpuls, Schalter rechts */
.wechsler-innen { height: 100%; display: flex; align-items: center; }
.wechsler-titel { order: 0; flex: none; margin: 0; font-size: 12px; font-weight: 500; letter-spacing: .03em; color: var(--vb-text); white-space: nowrap; }
.wechsler-titel b { font-weight: 700; color: var(--vb-text-stark); }
.wechsler-innen::after { content: ""; order: 1; flex: 1 1 auto; min-width: 24px; height: 1px; margin: 0 18px;
    background: linear-gradient(90deg, transparent, var(--vb-eigen, #fff), transparent) no-repeat, linear-gradient(90deg, transparent, var(--vb-rahmen));
    background-size: 70px 100%, 100% 100%; background-position: -70px 0, 0 0;
    animation: wechsler-impuls 9s cubic-bezier(.5, 0, .7, 1) 2s infinite; }
@keyframes wechsler-impuls { 0% { background-position: -70px 0, 0 0; } 13%, 100% { background-position: calc(100% + 70px) 0, 0 0; } }

/* Der Schalter: Pille mit drei Zielen, darunter das gleitende Band (aktuelle Website) und ein Hauch beim Darüberfahren */
.wechsler-schalter { order: 2; position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 2px; padding: 3px;
    border-radius: 999px; background: var(--vb-grund); border: 1px solid var(--vb-rahmen); }
.wechsler-ziel { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 12px 0 4px;
    border-radius: 999px; color: var(--vb-text); text-decoration: none; font-size: 13px; font-weight: 600; line-height: 1; letter-spacing: .01em;
    white-space: nowrap; transition: color .3s; -webkit-tap-highlight-color: transparent; }
.wechsler-ziel:hover, .wechsler-ziel:focus-visible { color: var(--vb-text-stark); }
.wechsler-ziel[aria-current="page"] { color: var(--vb-aktiv-text); cursor: default; }
.wechsler-ziel:focus-visible { outline: 2px solid var(--vb-marke); outline-offset: 2px; }
.wechsler-ziel small { font-size: 11.5px; font-weight: 500; opacity: .7; }
/* Markenzeichen (Element heißt aus Kompatibilität noch .wechsler-punkt) */
.wechsler-punkt { flex: none; width: 18px; height: 18px; border-radius: 6px; background: var(--vb-symbol) center / cover no-repeat;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 1px 3px rgba(0, 0, 0, .35); transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.wechsler-ziel:not([aria-current="page"]):hover .wechsler-punkt { transform: translateY(-1px) scale(1.08); }
.wechsler-ziel.geht .wechsler-punkt { animation: wechsler-hops .5s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes wechsler-hops { 40% { transform: scale(1.28) rotate(-6deg); } }
/* Pfeil ↗ an den anderen Websites: „führt zu einer anderen Website“ */
.wechsler-ziel:not([aria-current="page"])::after { content: ""; flex: none; width: 9px; height: 9px; margin-left: -3px; background: currentColor; opacity: .4;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 9 9 3M4.2 3H9v4.8' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 9 9 3M4.2 3H9v4.8' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; transition: opacity .3s, transform .3s; }
.wechsler-ziel:hover::after, .wechsler-ziel:focus-visible::after { opacity: 1; transform: translate(1.5px, -1.5px); }
[data-ziel="itjaeger"] { --vb-marke: #ff3b2f; --vb-symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3CradialGradient id='g' cx='.3' cy='.25' r='1'%3E%3Cstop offset='0' stop-color='%230e6a93'/%3E%3Cstop offset='.75' stop-color='%23052f43'/%3E%3C/radialGradient%3E%3ClinearGradient id='s' x1='32' y1='32' x2='50' y2='12' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%2343c4ec' stop-opacity='.95'/%3E%3Cstop offset='1' stop-color='%2343c4ec' stop-opacity='.12'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='64' height='64' rx='14' fill='url(%23g)'/%3E%3Ccircle cx='32' cy='32' r='23' fill='none' stroke='%2343c4ec' stroke-opacity='.75' stroke-width='2.6'/%3E%3Ccircle cx='32' cy='32' r='13' fill='none' stroke='%2343c4ec' stroke-opacity='.45' stroke-width='2'/%3E%3Cpath d='M32 32 32 9A23 23 0 0 1 52.85 22.28Z' fill='url(%23s)'/%3E%3Ccircle cx='44.5' cy='44' r='3.6' fill='%23fff'/%3E%3Ccircle cx='32' cy='32' r='6.2' fill='%23ff3b2f' stroke='%23fff' stroke-width='2.2'/%3E%3C/svg%3E"); }
[data-ziel="allworks"] { --vb-marke: #8b5cff; --vb-symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3ClinearGradient id='v' x1='9' y1='0' x2='55' y2='0' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%238b5cff'/%3E%3Cstop offset='.52' stop-color='%2322d3ee'/%3E%3Cstop offset='1' stop-color='%23b4f25a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='64' height='64' rx='14' fill='%230d0f18'/%3E%3Crect x='1' y='1' width='62' height='62' rx='13' fill='none' stroke='%23fff' stroke-opacity='.08' stroke-width='2'/%3E%3Cpath d='M21.5 19 10.5 32l11 13M42.5 19l11 13-11 13M36.5 13.5l-9 37' fill='none' stroke='url(%23v)' stroke-width='6.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
[data-ziel="pruefmeister"] { --vb-marke: #1b8fd6; --vb-symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3ClinearGradient id='pm-grund' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%231b8fd6'/%3E%3Cstop offset='1' stop-color='%23005a96'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='64' height='64' rx='15' fill='url(%23pm-grund)'/%3E%3Ccircle cx='32' cy='32' r='22.5' fill='%23fff'/%3E%3Cpath d='M32 15.4L32 11.8M40.9 16.59L42.1 14.51M47.41 23.1L49.49 21.9M48.6 32L52.2 32M47.41 40.9L49.49 42.1M40.9 47.41L42.1 49.49M32 48.6L32 52.2M23.1 47.41L21.9 49.49M16.59 40.9L14.51 42.1M15.4 32L11.8 32M16.59 23.1L14.51 21.9M23.1 16.59L21.9 14.51' stroke='%230072bc' stroke-width='2.2' stroke-linecap='round'/%3E%3Ccircle cx='32' cy='32' r='12.5' fill='%230e2235'/%3E%3Cpath d='M26.2 32.3l4 4 7.8-8.6' fill='none' stroke='%23fff' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.wechsler-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wechsler-band, .wechsler-hauch { position: absolute; top: 3px; bottom: 3px; left: 0; border-radius: 999px; pointer-events: none; }
.wechsler-band { z-index: 1; width: var(--vb-w, 0); transform: translateX(var(--vb-x, 0)); overflow: hidden; background: var(--vb-band);
    box-shadow: inset 0 1px 0 var(--vb-kante), 0 0 0 1px rgba(255, 255, 255, .05), 0 6px 16px -6px var(--vb-glut, transparent), 0 2px 6px -2px rgba(0, 0, 0, .4);
    transition: transform .6s cubic-bezier(.34, 1.3, .64, 1), width .6s cubic-bezier(.34, 1.3, .64, 1), box-shadow .6s; }
.wechsler-band.sofort, .wechsler-band.sofort::before { transition: none; }
/* Leuchtlinie: ein Streifen mit allen drei Markenfarben, der beim Gleiten mitwandert (rot → violett/türkis/grün → blau) */
.wechsler-band::before { content: ""; position: absolute; left: 13px; right: 13px; bottom: 1px; height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, #ff3b2f 0 33.333%, #8b5cff 33.333%, #22d3ee 50%, #b4f25a 66.666%, #1b8fd6 66.666% 100%);
    background-size: 300% 100%; background-position: var(--vb-pos, 0%) 0; box-shadow: 0 0 8px 0 var(--vb-glut, transparent);
    transition: background-position .6s cubic-bezier(.34, 1.3, .64, 1), box-shadow .6s; }
/* Lichtstreif, der kurz nach dem Impuls über das Band läuft */
.wechsler-band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .3) 50%, transparent 62%);
    background-size: 260% 100%; background-position: 130% 0; animation: wechsler-glanz 9s ease-in-out 2s infinite; }
@keyframes wechsler-glanz { 0%, 13% { background-position: 130% 0; } 28%, 100% { background-position: -30% 0; } }
.wechsler-schalter[data-band="itjaeger"] { --vb-pos: 0%; --vb-glut: rgba(255, 59, 47, .6); }
.wechsler-schalter[data-band="allworks"] { --vb-pos: 50%; --vb-glut: rgba(34, 211, 238, .5); }
.wechsler-schalter[data-band="pruefmeister"] { --vb-pos: 100%; --vb-glut: rgba(27, 143, 214, .65); }
.wechsler-hauch { z-index: 0; width: var(--vb-hw, 0); transform: translateX(var(--vb-hx, 0)); background: var(--vb-hauch); opacity: 0;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), width .35s cubic-bezier(.2, .8, .2, 1), opacity .25s; }
.wechsler-schalter.hauch-an .wechsler-hauch { opacity: 1; }
/* Ohne JavaScript (oder bevor gemessen ist): die aktuelle Website direkt markieren */
.wechsler:not(.bereit) .wechsler-ziel[aria-current="page"] { background: var(--vb-band); box-shadow: inset 0 1px 0 var(--vb-kante), inset 0 -2px 0 var(--vb-marke); }

@media (max-width: 1180px) { .wechsler-ziel small { display: none; } }
@media (max-width: 760px) {
    :root { --wechsler-h: 42px; }
    .wechsler-titel, .wechsler-innen::after { display: none; }
    .wechsler-innen { justify-content: center; }
    .wechsler-schalter { width: 100%; max-width: 440px; }
    .wechsler-ziel { flex: 1 1 0; justify-content: center; height: 30px; padding: 0 6px; gap: 7px; }
    .wechsler-ziel::after { display: none; }
}
@media (max-width: 360px) {
    .wechsler-ziel { font-size: 12px; padding: 0 3px; gap: 5px; }
    .wechsler-punkt { width: 16px; height: 16px; border-radius: 5px; }
}
@media (prefers-reduced-motion: reduce) {
    .wechsler-band, .wechsler-band::before, .wechsler-hauch, .wechsler-ziel, .wechsler-punkt { transition: none; }
    .wechsler-band::after, .wechsler-innen::after, .wechsler-ziel.geht .wechsler-punkt { animation: none; }
}
html.ba-ruhig .wechsler-band, html.ba-ruhig .wechsler-band::before, html.ba-ruhig .wechsler-hauch, html.ba-ruhig .wechsler-punkt { transition: none; }
html.ba-ruhig .wechsler-band::after, html.ba-ruhig .wechsler-innen::after, html.ba-ruhig .wechsler-ziel.geht .wechsler-punkt { animation: none; }
@media print { .wechsler { display: none; } }
