/* =========================================================
   Zwanzig Tabs und die Werkzeuge (Runde LP 22.11.2026, config werkzeuge: an)
   Ablauf beim Scrollen (js/werkzeuge.js setzt --f und .an):
   1. die Tabs stehen verstreut, 2. sie fliegen in den App Rahmen, der Rahmen schiebt sich hoch,
   3. der Rahmen bleibt stehen und zeigt Tool für Tool ein echtes Bild der App, links wechselt der Text.
   Kein Zoom: nur Schieben und Einblenden. Ohne html.bew steht jedes Werkzeug mit Bild untereinander.
   ========================================================= */
.wz { --wf: 0; padding: 120px 0 40px; }
.wz-in { position: relative; }
.wz-kopf .lead.stark { color: var(--ink); font-weight: 540; }

/* Tabs (ruhiger Stand: als Reihe unter dem Text) */
.wz-feld { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.wz-tab { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; background: var(--s); border: 1px solid var(--line2); border-radius: 10px; padding: 8px 12px 8px 10px; font-size: 14px; color: var(--ink2); box-shadow: 0 1px 2px rgba(19,18,17,.04); }
.wz-tab::before { content: ""; width: 11px; height: 11px; border-radius: 4px; background: var(--f, var(--line2)); flex: none; }
.wz-rahmen { display: none; }

/* Werkzeuge (ruhiger Stand: Text und Bild nebeneinander, untereinander) */
.wz-werk { margin-top: 90px; display: grid; gap: 70px; }
.wz-alles { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.wz-logo .logo { height: 22px; display: block; }
.wz-zaehler { margin-left: auto; color: var(--muted); }
.wz-t { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 20px 56px; align-items: center; }
.wz-name { grid-column: 1; align-self: end; display: flex; align-items: baseline; gap: 12px; border: 0; background: none; padding: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--akzent); text-align: left; cursor: default; }
.wz-nr { color: var(--muted); }
.wz-t-text { grid-column: 1; align-self: start; }
.wz-t h3 { font-size: clamp(26px, 2.6vw, 36px); line-height: 1.08; letter-spacing: -.035em; font-weight: 560; margin: 0; text-wrap: balance; }
.wz-t p { font-size: 17px; line-height: 1.5; color: var(--ink2); margin: 12px 0 0; max-width: 460px; text-wrap: pretty; }
.wz-statt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 18px !important; }
.wz-statt .mono { margin-right: 4px; }
.wz-statt s { position: relative; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 13px; color: var(--muted); background: var(--s); border: 1px solid var(--line); border-radius: 8px; padding: 4px 9px 4px 7px; }
.wz-statt s::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--f); opacity: .55; }
.wz-statt s::after { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 1.5px; background: var(--ink2); transform-origin: left; transform: scaleX(1); }
.wz-bild { grid-column: 2; grid-row: 1 / span 2; position: relative; margin: 0; border-radius: 18px; overflow: hidden; background: var(--s); border: 1px solid var(--line); box-shadow: var(--sch3); }
.wz-bild img { width: 100%; height: auto; }
.wz-toast { position: absolute; right: 18px; bottom: 18px; display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line2); border-radius: 999px; padding: 7px 14px 7px 8px; font-size: 13.5px; font-weight: 560; box-shadow: 0 12px 28px -14px rgba(19,18,17,.4); }
.wz-toast b { background: var(--akzent); color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 12.5px; }
.wz-toast i { width: 22px; height: 22px; border-radius: 50%; background: #e6f4ec; color: var(--ok); display: grid; place-items: center; }
.wz-toast i svg { width: 12px; height: 12px; }
@media (max-width: 899px) {
  .wz-t { grid-template-columns: 1fr; }
  .wz-bild { grid-column: 1; grid-row: auto; }
}
@media (max-width: 640px) {
  .wz { padding-top: 90px; }
  .wz-tab { font-size: 12.5px; padding: 5px 9px 5px 7px; gap: 6px; border-radius: 8px; }
  .wz-tab::before { width: 9px; height: 9px; border-radius: 3px; }
  .wz-werk { margin-top: 60px; gap: 56px; }
  .wz-t p { font-size: 15.5px; }
}

/* =========================================================
   Mit Bewegung: eine stehende Bühne
   ========================================================= */
html.bew .wz { padding: 0; }
html.bew .wz-bahn { position: relative; height: calc((1.95 + var(--n, 13) * .5) * 100vh); }
html.bew .wz-buehne { position: sticky; top: 0; height: 100vh; height: 100svh; padding-top: 76px; overflow: hidden; }
html.bew .wz-in { height: 100%; display: grid; grid-template-columns: 360px minmax(0, 1fr); column-gap: 44px; align-items: center; }
html.bew .wz-kopf, html.bew .wz-werk { grid-area: 1 / 1; }
html.bew .wz-feld, html.bew .wz-rahmen, html.bew .wz-logo-mitte { grid-area: 1 / 2; }

/* Text: Kopf geht nach oben weg, die Liste kommt von unten */
html.bew .wz-kopf { --k: clamp(0, (var(--wf) - .82) * 6, 1); opacity: calc(1 - var(--k)); transform: translateY(calc(var(--k) * -48px)); }
html.bew .wz-kopf .lead:not(.stark) { opacity: clamp(0, 1 - var(--wf) * 2.6, 1); }
html.bew .wz-kopf { display: grid; align-content: center; }
html.bew .wz-kopf > .lead { grid-area: 3 / 1; }
html.bew .wz-kopf .lead.stark { opacity: clamp(0, var(--wf) * 2.6 - 1.2, 1); }
html.bew .wz-werk { --k: clamp(0, (var(--wf) - .9) * 10, 1); margin: 0; padding: 0; max-width: none; gap: 0; opacity: var(--k); transform: translateY(calc((1 - var(--k)) * 48px)); }
html.bew .wz:not(.wz-an) .wz-werk { pointer-events: none; }

/* Tabs fliegen von ihrem Platz in die Mitte des Rahmens */
html.bew .wz-feld { position: relative; height: 100%; margin: 0; display: block; pointer-events: none; z-index: 2; }
html.bew .wz-tab { --q: clamp(0, (var(--wf) - var(--d) * .9) / .45, 1); position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  transform: translate(calc(var(--x) * (1 - var(--q))), calc(var(--y) * (1 - var(--q)))) rotate(calc(var(--r) * (1 - var(--q))));
  opacity: clamp(0, (1 - var(--q)) * 3, 1); }

/* Das Logo in der Mitte: die Tabs fliegen hinein, der Ring wächst mit, dann macht es dem Rahmen Platz (kein Zoom, nur Schatten und Einblenden) */
.wz-logo-mitte { display: none; }
html.bew .wz-logo-mitte { --l: clamp(0, 1 - (var(--wf) - .74) * 6, 1); display: grid; justify-items: center; gap: 18px; align-self: center; justify-self: center; z-index: 1; pointer-events: none;
  opacity: var(--l); transform: translateY(calc((1 - var(--l)) * -30px)); }
html.bew .wz-logo-icon { display: block; width: 112px; height: 112px; border-radius: 30px; overflow: hidden;
  box-shadow: 0 0 0 calc(var(--wf) * 20px) var(--hauch), 0 0 0 calc(var(--wf) * 42px) rgba(36,71,209,.06), 0 30px 60px -24px rgba(19,18,17,.4); }
html.bew .wz-logo-icon svg, html.bew .wz-logo-icon .zeichen-logo { display: block; width: 100%; height: 100%; }
html.bew .wz-logo-wort { opacity: clamp(0, (var(--wf) - .45) * 4, 1); }
html.bew .wz-logo-wort .logo { height: 30px; display: block; }

/* Der Rahmen */
html.bew .wz-rahmen { --e: clamp(0, (var(--wf) - .76) * 4.2, 1); display: flex; flex-direction: column; align-self: center; justify-self: center; width: min(100%, calc((100svh - 208px) * 1.2727)); position: relative; z-index: 1; background: var(--s); border: 1px solid var(--line2); border-radius: 18px; box-shadow: var(--sch3); overflow: hidden;
  opacity: var(--e); transform: translateY(calc((1 - var(--e)) * 60px)); }
.wz-leiste { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--s2); flex: none; }
.wz-leiste > i { width: 10px; height: 10px; border-radius: 50%; background: var(--line2); }
.wz-adresse { flex: none; margin: 0 6px 0 10px; display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 14px 0 6px; border-radius: 8px; background: var(--s); border: 1px solid var(--line); font-size: 13px; color: var(--ink2); justify-content: center; }
.wz-alt { display: flex; flex-wrap: wrap; align-content: center; gap: 4px; min-width: 0; }
/* Desktop: Platz für zwei Reihen alter Tabs, immer gleich hoch, damit der Rahmen nicht springt */
html.bew .wz-rahmen .wz-leiste { height: 68px; align-items: center; }
html.bew .wz-rahmen .wz-alt { flex: 1; max-height: 56px; }
.wz-alt s { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 7px; border-radius: 8px; background: transparent; border: 1px solid var(--line); font-size: 12px; color: var(--muted); text-decoration: none; white-space: nowrap;
  animation: wz-alt-rein .45s cubic-bezier(.16, 1, .3, 1) both; }
.wz-alt s::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--f); opacity: .5; }
.wz-alt s::after { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 1.5px; background: var(--ink2); transform-origin: left; animation: wz-strich .5s cubic-bezier(.65, 0, .35, 1) .35s both; }
.wz-alt s:nth-child(2) { animation-delay: .06s; } .wz-alt s:nth-child(2)::after { animation-delay: .45s; }
.wz-alt s:nth-child(3) { animation-delay: .12s; } .wz-alt s:nth-child(3)::after { animation-delay: .55s; }
.wz-alt s:nth-child(4) { animation-delay: .18s; } .wz-alt s:nth-child(4)::after { animation-delay: .65s; }
.wz-alt s:nth-child(5) { animation-delay: .24s; } .wz-alt s:nth-child(5)::after { animation-delay: .75s; }
@keyframes wz-alt-rein { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes wz-strich { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.wz-zeichen .zeichen-logo, .wz-zeichen svg { width: 16px; height: 16px; display: block; border-radius: 4px; }
html.bew .wz-flaeche { position: relative; aspect-ratio: 1400 / 1100; overflow: hidden; background: var(--s); }

/* Bilder im Rahmen: das aktive steht, das vorige ist nach oben weg, das nächste wartet unten */
/* Bilder im Rahmen: wie ein Band, das aktive steht, das nächste schiebt sich mit dem Scrollen von unten herein (js/werkzeuge.js) */
html.bew .wz-flaeche .wz-bild { position: absolute; inset: 0; margin: 0; border: 0; border-radius: 0; box-shadow: none; background: var(--s); visibility: hidden; will-change: transform; }
html.bew .wz-flaeche .wz-bild.quer { display: grid; align-content: center; background: #f7f7f8; }
html.bew .wz-flaeche .wz-bild img { width: 100%; height: auto; }
html.bew .wz-flaeche .wz-toast { opacity: 0; transform: translateY(14px); transition: opacity .4s var(--weich) .35s, transform .5s var(--weich) .35s; }
html.bew .wz-flaeche .wz-bild.an .wz-toast { opacity: 1; transform: none; }

/* Liste links (Runde 4: schicker): eine helle Karte, Nummern als Plaketten, das aktive Werkzeug klappt als Karte auf, unten läuft der Fortschritt */
html.bew .wz-werk { background: var(--s); border: 1px solid var(--line); border-radius: 22px; padding: 8px; box-shadow: 0 1px 2px rgba(19,18,17,.04), 0 24px 60px -36px rgba(19,18,17,.35); }
html.bew .wz-alles { margin: 0; padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
html.bew .wz-t { display: block; position: relative; border-radius: 14px; transition: background .3s; }
html.bew .wz-name { width: 100%; display: flex; align-items: center; gap: 12px; padding: 4px 10px; font-family: var(--font); font-size: 14.5px; letter-spacing: -.01em; text-transform: none; color: var(--ink2); cursor: pointer; border-radius: 12px; transition: color .25s, background .25s; }
html.bew .wz-name .wz-nr { flex: none; display: grid; place-items: center; width: 26px; height: 22px; border-radius: 7px; background: var(--s3); font-family: var(--mono); font-size: 10.5px; letter-spacing: .02em; color: var(--muted); transition: background .25s, color .25s; }
html.bew .wz-t:not(.an) .wz-name:hover { background: var(--s2); color: var(--ink); }
html.bew .wz-t.an { background: var(--hauch); }
html.bew .wz-t.an .wz-name { color: var(--akzent); font-weight: 600; }
html.bew .wz-t.an .wz-nr { background: var(--akzent); color: #fff; }
html.bew .wz-t::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px; border-radius: 2px; background: var(--akzent); transform-origin: left; transform: scaleX(var(--wt, 0)); opacity: 0; transition: opacity .3s; }
html.bew .wz-t.an::after { opacity: 1; }
html.bew .wz-t-text > div { padding: 2px 12px 14px; }
html.bew .wz-t-text { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .5s var(--weich), opacity .35s; }
html.bew .wz-t-text > * { min-height: 0; overflow: hidden; }
html.bew .wz-t-text { overflow: hidden; }
html.bew .wz-t.an .wz-t-text { grid-template-rows: 1fr; opacity: 1; }
html.bew .wz-t-text > div { min-height: 0; }
html.bew .wz-t h3 { font-size: 22px; }
html.bew .wz-t p { font-size: 14.5px; line-height: 1.45; margin-top: 6px; }
html.bew .wz-statt { margin: 10px 0 14px !important; gap: 5px; }
html.bew .wz-statt s { font-size: 12px; padding: 2px 8px 2px 6px; }
html.bew .wz-statt s::after { transform: scaleX(0); transition: transform .45s var(--weich); }
html.bew .wz-t.an .wz-statt s::after { transform: scaleX(1); }
html.bew .wz-t.an .wz-statt s:nth-of-type(2)::after { transition-delay: .08s; }
html.bew .wz-t.an .wz-statt s:nth-of-type(3)::after { transition-delay: .16s; }
html.bew .wz-t.an .wz-statt s:nth-of-type(4)::after { transition-delay: .24s; }
html.bew .wz-t.an .wz-statt s:nth-of-type(5)::after { transition-delay: .32s; }
@media (min-width: 900px) { html.bew .wz-werk .wz-statt { display: none; } }
@media (max-height: 820px) and (min-width: 900px) {
  html.bew .wz-adresse [data-wz-adresse] { display: none; }
  html.bew .wz-adresse { padding: 0 6px; }
  html.bew .wz-name { padding: 2px 10px; font-size: 13.5px; }
  html.bew .wz-name .wz-nr { height: 20px; }
  html.bew .wz-alles { padding: 6px 12px 8px; }
  html.bew .wz-t h3 { font-size: 19px; }
  html.bew .wz-t p { font-size: 13.5px; margin-top: 4px; }
  html.bew .wz-statt { margin: 8px 0 10px !important; }
}

/* Schmal: Text oben, Rahmen darunter, nur das aktive Werkzeug */
@media (max-width: 899px) {
  html.bew .wz-buehne { padding-top: 64px; }
  html.bew .wz-in { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); row-gap: 18px; align-items: start; padding-top: 18px; padding-bottom: 18px; }
  html.bew .wz-feld, html.bew .wz-rahmen, html.bew .wz-logo-mitte { grid-area: 2 / 1; }
  html.bew .wz-logo-mitte { align-self: center; }
  html.bew .wz-logo-icon { width: 84px; height: 84px; border-radius: 22px; }
  html.bew .wz-logo-wort .logo { height: 24px; }
  /* Am Handy keine Karte um die Liste, nur das aktive Werkzeug */
  html.bew .wz-werk { background: none; border: 0; padding: 0; box-shadow: none; border-radius: 0; }
  html.bew .wz-t.an { background: none; }
  html.bew .wz-t-text > div { padding: 0; }
  html.bew .wz-name { padding: 0 0 6px; gap: 8px; }
  html.bew .wz-t::after { left: 0; right: 0; bottom: auto; top: -6px; }
  html.bew .wz-feld { height: auto; display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start; gap: 6px 5px; }
  html.bew .wz-tab { position: relative; left: auto; top: auto; translate: none; transform: translate(calc(var(--dx, 0px) * var(--q)), calc(var(--dy, 0px) * var(--q))); }
  html.bew .wz-rahmen { align-self: stretch; justify-self: center; width: 100%; max-height: 100%; }
  /* Sobald die Werkzeuge laufen, gibt der Kopf seinen Platz frei (weich), der Rahmen rückt an den Text */
  html.bew .wz-kopf { max-height: 480px; padding-bottom: 12px; overflow: hidden; transition: max-height .5s var(--weich); }
  html.bew .wz.wz-an .wz-kopf { max-height: 0; padding-bottom: 0; }
  html.bew .wz-alles { display: none; }
  html.bew .wz-werk { display: grid; }
  /* Alle Werkzeuge liegen übereinander, die Zeile ist so hoch wie das längste. Jedes steht unten, direkt über dem Rahmen:
     Werkzeuge mit wenig Text haben so keine Lücke zum Handy, der Rahmen springt beim Wechsel nicht */
  html.bew .wz-t { grid-area: 1 / 1; align-self: end; border: 0 !important; opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s .35s; }
  html.bew .wz-t.an { opacity: 1; visibility: visible; transition: opacity .35s .1s; }
  html.bew .wz-name { padding: 0 0 6px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; cursor: default; }
  html.bew .wz-name .wz-nr { color: var(--muted); }
  html.bew .wz-t-text { grid-template-rows: 1fr; opacity: 1; transition: none; }
  html.bew .wz-t h3 { font-size: 24px; }
  html.bew .wz-t p { font-size: 15px; }
  html.bew .wz-statt { margin: 10px 0 0 !important; }
  html.bew .wz-flaeche { flex: 1; aspect-ratio: auto; }
}
@media (max-width: 640px) {
  html.bew .wz-buehne { padding-top: 60px; }
  html.bew .wz-in { padding-top: 14px; row-gap: 14px; }
  html.bew .wz .titel { font-size: 36px; }
  html.bew .wz .lead { font-size: 15px; line-height: 1.5; margin-top: 12px; }
  html.bew .wz-rahmen { width: min(300px, 80vw); border-radius: 26px; }
  html.bew .wz-leiste { display: none; }
  html.bew .wz-t h3 { font-size: 21px; }
  html.bew .wz-t p { font-size: 14px; margin-top: 6px; }
  html.bew .wz-statt { gap: 4px; }
  html.bew .wz-statt .mono { font-size: 10.5px; }
  html.bew .wz-statt s { font-size: 11.5px; padding: 1px 6px 1px 5px; gap: 5px; border-radius: 6px; }
  html.bew .wz-statt s::before { width: 7px; height: 7px; border-radius: 2px; }
  html.bew .wz-feld { gap: 5px 4px; }
  html.bew .wz-tab { font-size: 11.5px; padding: 4px 7px 4px 6px; gap: 5px; border-radius: 7px; }
  html.bew .wz-tab::before { width: 8px; height: 8px; border-radius: 2px; }
  /* Am Handy ist der Bildschirm länger als der Rahmen: das Bild schiebt sich beim Scrollen durch, nichts bleibt verborgen */
  html.bew .wz-flaeche .wz-bild img { transform: translateY(var(--s, 0px)); }
  html.bew .wz-flaeche .wz-bild.quer { display: grid; align-content: center; }
  html.bew .wz-toast { right: 10px; bottom: 12px; font-size: 12px; }
}
