/* Bewegung fuer Preis pruefen, Summe pruefen und Gebrauchtbootmarkt.
   Nur transform, opacity und stroke: das laeuft ohne Neuberechnung des
   Layouts. Bei "weniger Bewegung" stehen alle Teile gleich im Endzustand. */

/* ---------- Preisskala mit Boot ---------- */
.bp-see { position: relative; height: 172px; margin: 6px 0 4px; opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .6s cubic-bezier(.2, .9, .3, 1.2); color: var(--nm-logoblau); }
.bp-see.an { opacity: 1; transform: none; }
.bp-zonen { position: absolute; left: 0; right: 0; bottom: 34px; height: 30px; display: flex; overflow: hidden; }
.bp-zone { position: relative; height: 100%; flex: 0 0 auto; transition: flex-basis .9s cubic-bezier(.65, 0, .35, 1), opacity .4s; opacity: .5; border-right: 2px solid var(--color-bg, #fff); }
.bp-zone:last-child { border-right: 0; }
.bp-zone[data-ton="kalt"] { background: color-mix(in srgb, var(--nm-logoblau) 75%, transparent); }
.bp-zone[data-ton="kuehl"] { background: color-mix(in srgb, var(--nm-logoblau) 42%, transparent); }
.bp-zone[data-ton="mitte"] { background: color-mix(in srgb, var(--color-text) 22%, transparent); }
.bp-zone[data-ton="warm"] { background: color-mix(in srgb, var(--nm-logopink) 45%, transparent); }
.bp-zone[data-ton="heiss"] { background: color-mix(in srgb, var(--nm-logopink) 85%, transparent); }
.bp-zone.treffer { opacity: 1; animation: bp-puls 1.6s ease-in-out .9s 2; }
@keyframes bp-puls { 50% { filter: brightness(1.35) saturate(1.3); } }
.bp-zone::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: translateX(-100%); }
.bp-zone.treffer::after { animation: bp-glanz 1.1s ease .9s 1; }
@keyframes bp-glanz { to { transform: translateX(100%); } }

.bp-wasser { position: absolute; left: 0; right: 0; bottom: 52px; height: 40px; overflow: hidden; pointer-events: none; }
.bp-welle { position: absolute; left: 0; bottom: 0; width: 200%; max-width: none; height: 100%; animation: bp-wellen 7s linear infinite; }
.bp-welle.hinten { opacity: .35; animation-duration: 11s; animation-direction: reverse; bottom: 6px; }
.bp-welle path { fill: currentColor; opacity: .55; }
@keyframes bp-wellen { to { transform: translateX(-50%); } }

.bp-boot { position: absolute; bottom: 60px; left: 0; width: 96px; margin-left: -48px; transform: translateX(var(--x, 0px)); transition: transform 1.25s cubic-bezier(.34, 1.45, .55, 1); color: var(--color-text); }
.bp-rumpf { display: block; width: 96px; height: auto; transform-origin: 50% 90%; animation: bp-schaukeln 3.2s ease-in-out infinite; }
.bp-boot.faehrt .bp-rumpf { animation: bp-kraengen .45s ease-in-out infinite alternate; }
.bp-boot.links .bp-rumpf { scale: -1 1; }
@keyframes bp-schaukeln { 0%, 100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(3deg) translateY(-4px); } }
@keyframes bp-kraengen { from { transform: rotate(-9deg) translateY(-2px); } to { transform: rotate(4deg) translateY(-7px); } }
.bp-gischt { position: absolute; bottom: 2px; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--nm-logoblau); opacity: 0; }
.bp-boot.faehrt .bp-gischt { animation: bp-spritzer .5s ease-out infinite; }
.bp-boot.faehrt .bp-gischt:nth-child(3) { animation-delay: .17s; }
.bp-boot.faehrt .bp-gischt:nth-child(4) { animation-delay: .34s; }
@keyframes bp-spritzer { 0% { opacity: .9; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(calc(var(--r, -1) * 46px), -26px) scale(.2); } }
.bp-ring { position: absolute; bottom: -6px; left: 50%; width: 110px; height: 26px; margin-left: -55px; border: 2px solid var(--nm-logoblau); border-radius: 50%; opacity: 0; }
.bp-boot.angekommen .bp-ring { animation: bp-ring 1s ease-out 1; }
.bp-boot.angekommen .bp-ring + .bp-ring { animation-delay: .25s; }
@keyframes bp-ring { 0% { opacity: .9; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.6); } }
.bp-fahne { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -6px); white-space: nowrap; font: 600 14px/1 var(--font-num, inherit); padding: 6px 9px; background: var(--color-text); color: var(--color-bg, #fff); opacity: 0; transition: opacity .3s .9s; }
.bp-boot.angekommen .bp-fahne { opacity: 1; }
.bp-skala-text { position: absolute; left: 0; right: 0; bottom: 6px; display: flex; justify-content: space-between; font: 500 13.5px/1 var(--font-num, inherit); color: color-mix(in srgb, var(--color-text) 72%, transparent); }

/* Urteil: Buchstaben tauchen einzeln auf */
.bw-betrag .bp-b { display: inline-block; animation: bp-buchstabe .6s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(var(--i) * 28ms); }
@keyframes bp-buchstabe { from { opacity: 0; transform: translateY(.55em) rotate(8deg); filter: blur(4px); } }

/* ---------- Gebrauchtbootmarkt: Meer im Kopf ---------- */
.gm-meer { position: relative; height: clamp(150px, 22vw, 230px); margin: 34px 0 0; overflow: hidden; color: var(--nm-logoblau); border-bottom: 2px solid currentColor; }
.gm-meer svg { position: absolute; display: block; }
.gm-schicht { left: 0; bottom: 0; width: 200%; max-width: none; height: 58%; animation: bp-wellen linear infinite; }
.gm-schicht path { fill: currentColor; }
.gm-schicht.s1 { opacity: .16; animation-duration: 26s; bottom: 18%; }
.gm-schicht.s2 { opacity: .28; animation-duration: 17s; animation-direction: reverse; bottom: 8%; }
.gm-schicht.s3 { opacity: .5; animation-duration: 11s; height: 40%; }
.gm-schiff { bottom: 24%; width: clamp(70px, 9vw, 110px); height: auto; color: var(--color-text); animation: gm-ueberfahrt linear infinite; }
.gm-schiff g { transform-origin: 50% 90%; animation: bp-schaukeln 3.4s ease-in-out infinite; }
.gm-schiff.f2 { bottom: 12%; width: clamp(56px, 7vw, 84px); animation-duration: 31s; animation-delay: -12s; }
.gm-schiff.f3 { bottom: 30%; width: clamp(48px, 6vw, 70px); animation-duration: 47s; animation-delay: -30s; opacity: .7; }
.gm-schiff.f4 { bottom: 6%; width: clamp(64px, 8vw, 96px); animation-duration: 23s; animation-delay: -4s; animation-direction: reverse; }
.gm-schiff.f4 g { scale: -1 1; }
.gm-schiff.f1 { animation-duration: 38s; animation-delay: -20s; }
@keyframes gm-ueberfahrt { from { left: -14%; } to { left: 104%; } }
.gm-blase { position: absolute; bottom: 10%; font: 600 clamp(14px, 1.6vw, 18px)/1 var(--font-num, inherit); color: var(--color-text); padding: 6px 9px; border: 1.5px solid currentColor; background: var(--color-bg, #fff); opacity: 0; animation: gm-aufstieg 7s ease-in infinite; white-space: nowrap; }
.gm-blase.runter { color: var(--nm-logoblau); }
.gm-blase.rauf { color: var(--nm-pinkschrift); }
@keyframes gm-aufstieg { 0% { opacity: 0; transform: translateY(20px) scale(.6); } 12% { opacity: 1; transform: translateY(0) scale(1); } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-140px) rotate(var(--dreh, 6deg)); } }

/* Zahlen, die hochzaehlen, behalten ihre Breite */
.gm-zahl { font-variant-numeric: tabular-nums; }

/* Abschnitte: Ueberschrift mit Strich, der beim Erscheinen durchlaeuft */
.gm-auf h2 { position: relative; }
.gm-auf h2::after { content: ''; display: block; height: 3px; width: 96px; margin-top: 10px; background: linear-gradient(90deg, var(--nm-logoblau), var(--nm-logopink)); transform: scaleX(0); transform-origin: left; transition: transform .9s cubic-bezier(.65, 0, .35, 1) .1s; }
.gm-auf.sichtbar h2::after { transform: scaleX(1); }

/* Laender: Balken nach links (guenstiger) oder rechts (teurer) */
.gm-dz { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; width: 100%; min-width: 120px; height: 10px; margin-top: 8px; }
.gm-dz::before { content: ''; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: color-mix(in srgb, var(--color-text) 40%, transparent); }
.gm-dz i { display: block; height: 10px; transform: scaleX(0); transition: transform 1s cubic-bezier(.2, 1.3, .4, 1); transition-delay: calc(var(--i, 0) * 70ms); }
.gm-dz i.l { grid-column: 1; justify-self: end; transform-origin: right; background: var(--nm-logoblau); }
.gm-dz i.r { grid-column: 2; justify-self: start; transform-origin: left; background: var(--nm-logopink); }
.sichtbar .gm-dz i { transform: scaleX(1); }

/* Rangliste: Zeilen fliegen ein, Balken wachsen */
.gm-rang tbody tr { opacity: 0; transform: translateX(-28px); transition: opacity .5s, transform .6s cubic-bezier(.2, 1.3, .4, 1); transition-delay: calc(var(--i, 0) * 55ms); }
.sichtbar .gm-rang tbody tr { opacity: 1; transform: none; }
.gm-balken { display: block; height: 6px; margin-top: 6px; background: linear-gradient(90deg, var(--nm-logoblau), var(--nm-logopink)); width: var(--w, 0%); transform: scaleX(0); transform-origin: left; transition: transform 1.2s cubic-bezier(.65, 0, .35, 1); transition-delay: calc(var(--i, 0) * 55ms + .25s); }
.sichtbar .gm-balken { transform: scaleX(1); }

/* Preisreihe: Linie zeichnet sich */
.gm-kurve { display: block; width: 100%; height: auto; margin: 0 0 18px; overflow: visible; }
.gm-kurve .linie { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: var(--l, 2000); stroke-dashoffset: var(--l, 2000); transition: stroke-dashoffset 2.2s cubic-bezier(.65, 0, .35, 1); }
.sichtbar .gm-kurve .linie { stroke-dashoffset: 0; }
.gm-kurve .punkt { transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform .5s cubic-bezier(.2, 1.6, .4, 1); }
.sichtbar .gm-kurve .punkt { transform: scale(1); }
.gm-kurve .gitter { stroke: color-mix(in srgb, var(--color-text) 22%, transparent); stroke-width: 1; }
.gm-kurve text { font: 500 12px var(--font-num, inherit); fill: color-mix(in srgb, var(--color-text) 75%, transparent); }
.gm-legende { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 12px; font-size: 15px; }
.gm-legende span::before { content: ''; display: inline-block; width: 18px; height: 3px; margin: 0 7px 4px 0; vertical-align: middle; background: var(--f); }

/* Angebotsdauer: Boot segelt die Strecke ab */
.gm-strecke { position: relative; height: 34px; min-width: 160px; border-bottom: 2px dashed color-mix(in srgb, var(--color-text) 30%, transparent); }
.gm-strecke svg { position: absolute; bottom: 0; left: 0; width: 44px; height: auto; color: var(--nm-logoblau); transform: translateX(0); transition: transform 2s cubic-bezier(.3, .1, .2, 1); transition-delay: calc(var(--i, 0) * 120ms); }
.sichtbar .gm-strecke svg { transform: translateX(calc(var(--w, 0) * (100cqw - 44px))); }
.gm-strecke { container-type: inline-size; }

@media (prefers-reduced-motion: reduce) {
  .bp-see, .bp-boot, .bp-zone, .gm-rang tbody tr, .gm-dz i, .gm-balken, .gm-kurve .linie, .gm-kurve .punkt, .gm-strecke svg, .gm-auf h2::after { transition: none !important; }
  .bp-welle, .bp-rumpf, .bp-gischt, .bp-ring, .bp-zone, .bp-zone::after, .bw-betrag .bp-b, .gm-schicht, .gm-schiff, .gm-schiff g, .gm-blase { animation: none !important; }
  .gm-schiff { left: 30%; }
  .gm-schiff.f2 { left: 62%; }
  .gm-schiff.f3 { left: 12%; }
  .gm-schiff.f4 { left: 82%; }
  .gm-blase { display: none; }
}
