/*
  Buchholz Bausteine – Spur (A2). Nur unter .bh-spur. Bewegung und Herkunft der Zahlen: assets/js/bh-spur.js.
  Feld 530 × 186,3 Vorlagen-Pixel (quelle/pfeile.html:1757), Seitenverhältnis als Untergrenze: Die Leinwand rechnet mit der Breite.
  Von außen (Tim 21.10., Entwurf B, bh-spur.js Kopf):
    --bh-feld-hoehe    Mindesthöhe der Fläche (Desktop/Tablet), z. B. clamp(360px, 36vw, 520px); das Feld wächst nach unten mit.
    --bh-feld-hoehe-m  dasselbe bis 767 px Breite, Standard 440 px (Entwurf B, Handy 390 px).
    --bh-rand          linke Kante der Zeilen (Seitenrand, Entwurf B: clamp(24px, 6.1vw, 88px)); ohne: Moodboard-Lage.
    --bh-rand-m        dasselbe bis 767 px, Standard 24 px.
  Handy bis 767 px: Claim clamp(26px, 8.4vw, 36px) (Entwurf B: 36 px), Oberkanten 48 px und 48 px + 1,17 em (bei 36 px: 48 / 90 px).
  Claim als HTML in Feld-Einheiten: 1 Einheit = 100cqw / 530 (das Feld ist sein eigener Container).
  Vorgaben vor dem Messen (bh-spur.js setzt sie aus der geladenen Schrift neu, Outfit 500: Versalhöhe 0,7 em, M-Vorbreite 0,076 em):
    --bh-fs 28,429 = 19,9 / 0,7        Schriftgröße für Versalhöhe 19,9 (pfeile.html:1828)
    --bh-x  45,14  = 47,3 − 0,076·fs   Stamm des M bei x 47,3 (pfeile.html:1831)
    --bh-y1/--bh-y2 = Grundlinie (805,5 / 835,66 minus Feldoberkante 717, pfeile.html:102) − 0,87·fs (Grundlinie bei line-height 1:
                     (1 − 1,26)/2 + 1,0 em; Outfit Oberlänge 1,0, Unterlänge 0,26)
  Farben aus tokens.json: Fläche Blau (Quelle :101), Navy, Koralle; Schrift Weiß auf Blau (7,26:1), Hellblau auf Navy (Rolle „helle
  Schrift auf Navy“), auf Koralle Weiß nur ab 24 px Schrift (3,35:1), darunter Navy (4,85:1).
  24 px Schrift = Feldbreite 24 · 530 / 28,429 = 447,4 px (Container-Abfrage unten).
  Hinweis „Claim zu breit“ (setzt bh-spur.js nur im Elementor-Editor; Maße ohne Quelle, entschieden): 13 px Outfit 500, Navy auf
  Weiß (16,26:1), unten und seitlich 8 px vom Rand, z-index 1.
  Ausnahme vom .bh-Präfix (Korrektur 21.10., wartet auf Tims Freigabe; Rückweg: die Regel unten löschen und in bau.php je
  Einsatz _element_width = 'inherit' setzen): In einem Elementor-Container „Zeile“ (flex row) fiele das Widget auf 0 × 0 px,
  weil es keine eigene Breite hat (container: inline-size, Kinder absolut). Elementor löst das für seine eigenen Widgets dieser
  Art genauso (assets/css/widget-divider.min.css: .e-con>.elementor-widget-divider): Breite aus --container-widget-width
  (Standard 100 %, „Breite: Benutzerdefiniert“ setzt sie), Wachsen wie eingestellt. Die Regel trifft nur die Elementor-Hülle
  genau dieses Widgets.
*/
.bh-widget.bh-spur {
  --bh-fs: 28.429;
  --bh-x: 45.14;
  --bh-y1: 63.767;
  --bh-y2: 93.927;
  container: bh-spur / inline-size;
  display: block;
  width: 100%;
  height: auto;
  min-height: var(--bh-feld-hoehe, 0px);
  max-height: none;
  aspect-ratio: 530 / 186.3;
  overflow: hidden;
  background: var(--bh-blau);
  color: var(--bh-weiss);
  -webkit-tap-highlight-color: transparent;
}
.bh-widget.bh-spur.bh-flaeche-navy { background: var(--bh-navy); color: var(--bh-hellblau); }
.bh-widget.bh-spur.bh-flaeche-koralle { background: var(--bh-koralle); color: var(--bh-weiss); }

/* Claim: echtes HTML über der Fläche, unter der Leinwand (wie in der Quelle: Text im SVG, Leinwand darüber) */
.bh-widget.bh-spur .bh-spur-claim {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: calc(var(--bh-fs) * 100cqw / 530);
  line-height: 1;
  letter-spacing: 0.005em;
  word-spacing: normal;
  text-align: left;
  text-transform: none;
  text-decoration: none;
  text-shadow: none;
}
.bh-widget.bh-spur .bh-spur-zeile {
  position: absolute;
  display: block;
  left: var(--bh-rand, calc(var(--bh-x) * 100cqw / 530));
  top: calc(var(--bh-y1) * 100cqw / 530);
  margin: 0;
  padding: 0;
  white-space: nowrap;
}
.bh-widget.bh-spur .bh-spur-zeile + .bh-spur-zeile { top: calc(var(--bh-y2) * 100cqw / 530); }

.bh-widget.bh-spur .bh-spur-leinwand {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  pointer-events: none;
}

/* Messzwilling des Claims (getBBox wie in der Quelle), nie sichtbar */
.bh-widget.bh-spur .bh-spur-zwilling {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  visibility: hidden;
  pointer-events: none;
}
.bh-widget.bh-spur .bh-spur-zwillingstext {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.005em;
}

@media (max-width: 767px) {
  /* Pfeile 1,8-mal größer: Zeichenfläche breiter als die Fläche, rechtsbündig (Tim 21.10.: „Pfeile so mickrig“) */
  .bh-widget.bh-spur .bh-spur-leinwand { left: auto; right: 0; width: calc(var(--bh-zoom-m, 1.8) * 100%); }
  .bh-widget.bh-spur { min-height: var(--bh-feld-hoehe-m, 440px); }
  .bh-widget.bh-spur .bh-spur-claim { font-size: clamp(26px, 8.4vw, 36px); letter-spacing: 0.01em; }
  .bh-widget.bh-spur .bh-spur-zeile { left: var(--bh-rand-m, 24px); top: 48px; }
  .bh-widget.bh-spur .bh-spur-zeile + .bh-spur-zeile { top: calc(48px + 1.17em); }
}

/* Große Bildschirme (Nina 28.10.): höchstens 560 px hoch statt mit der Breite zu wachsen (2560 px: vorher 901 px). Ab
   1593 px Breite (= 560 · 530 / 186,3) bleiben Claim und Zeichenfläche auf dem Maß von 1593 px stehen, die Zeichenfläche
   rechtsbündig (wie die Handy-Lupe, nur umgekehrt); links davon bleibt die Fläche frei für den Claim. */
@media (min-width: 1594px) {
  .bh-widget.bh-spur { --bh-feld-px: 1593px; aspect-ratio: auto; height: 560px; min-height: 0; }
  .bh-widget.bh-spur .bh-spur-leinwand { left: auto; right: 0; width: var(--bh-feld-px); }
  .bh-widget.bh-spur .bh-spur-claim { font-size: calc(var(--bh-fs) * var(--bh-feld-px) / 530); }
  .bh-widget.bh-spur .bh-spur-zeile { left: var(--bh-rand, calc(var(--bh-x) * var(--bh-feld-px) / 530)); top: calc(var(--bh-y1) * var(--bh-feld-px) / 530); }
  .bh-widget.bh-spur .bh-spur-zeile + .bh-spur-zeile { top: calc(var(--bh-y2) * var(--bh-feld-px) / 530); }
}

/* Ohne Pfeil-Animation (Nina 28.10.): Handy ohne den Platz für die Flüge, nur Claim (Oberkante 48 px + zwei Zeilen) und Luft.
   Fünf Klassen, weil die Seiten je Widget eigenes CSS mit min-height 360 px setzen. */
@media (max-width: 767px) {
  .elementor .elementor-widget-bh-spur .bh-widget.bh-spur.bh-spur-ohne-pfeil { min-height: 200px; }
}

@container bh-spur (width < 447.4px) {
  .bh-widget.bh-spur.bh-flaeche-koralle .bh-spur-claim { color: var(--bh-navy); }
}

/* Hinweis im Elementor-Editor: Claim zu breit (Kopf) */
.bh-widget.bh-spur .bh-hinweis {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 1;
  display: block;
  margin: 0;
  padding: 6px 10px;
  border: 0;
  border-left: 4px solid var(--bh-navy);
  background: var(--bh-weiss);
  color: var(--bh-navy);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: left;
  white-space: normal;
  pointer-events: none;
}

/* Ausnahme vom .bh-Präfix: Breite in Elementor-Containern „Zeile“ (Kopf) */
.e-con > .elementor-widget-bh-spur,
.e-con-inner > .elementor-widget-bh-spur {
  width: var(--container-widget-width, 100%);
  --flex-grow: var(--container-widget-flex-grow);
}
