/* ===========================================================================
   rezensionen2.css — Google-Rezensions-Band (dunkel), Kozik Engine
   ---------------------------------------------------------------------------
   Neue Kit-Datei. base.css, tokens.css und app.js bleiben unberuehrt.
   Eingebunden NACH base.css, damit die Reduced-Motion-Ausnahme unten die
   globale Bewegungsbremse des Kits ueberschreiben kann.

   Warum eigene Klassennamen (grev2-*):
   Die Seiten tragen die alte Marquee-CSS inline im <style> — und Inline-<style>
   steht IMMER nach den verlinkten Kit-Dateien. Haette dieses Band die alten
   Klassennamen weiterverwendet, wuerde die alte helle Karte (background:#fff)
   diese Datei ueberstimmen. Eigene Namen sind der einzige kollisionsfreie Weg.

   Grundsatz (Luke, 06.08.2026): dunkler Hintergrund, IMMER. Es gibt keine
   helle Fassung. Die Zitate stehen hell auf dunkel.

   Das Band bringt seinen eigenen dunklen Grund mit (var(--bg-0), in jeder
   Welt des Kits und in jeder Seiten-Ueberschreibung eine sehr dunkle Farbe,
   Luminanz <= 0,027). Es ist damit unabhaengig davon, ob die umgebende
   Sektion hell (.section.light) oder dunkel (.section--deep) ist.
   =========================================================================== */

.grev2 {
  --grev2-grund: var(--bg-0, #0B0E13);
  --grev2-karte: rgba(255, 255, 255, 0.05);
  --grev2-linie: rgba(255, 255, 255, 0.13);
  --grev2-hell: #F3F6FA;
  --grev2-weich: #C6D0DC;
  --grev2-leise: #9AA6B4;
  --grev2-gold: #FBBC04;
  --grev2-leer: rgba(255, 255, 255, 0.22);
  --grev2-blau: #8AB4F8;
  --grev2-dauer: 108s;

  position: relative;
  z-index: 1;
  margin-block: 40px 0;
  /* Randlos ueber die ganze Breite, auch wenn die umgebende Sektion seitliche
     Polsterung hat (gemessen: vier Seiten mit 16px, dort blieb das Band sonst
     34px schmaler als der Schirm). .section traegt overflow: clip, deshalb
     entsteht dadurch kein waagerechter Ueberlauf. */
  margin-inline: calc(50% - 50vw);
  padding-block: 40px 38px;
  background: var(--grev2-grund);
  border-top: 1px solid var(--grev2-linie);
  border-bottom: 1px solid var(--grev2-linie);
  color: var(--grev2-hell);
  isolation: isolate;
}

/* Sanfter Farbschleier, damit das Band auch in einer hellen Sektion als
   eigene Flaeche liest und in einer dunklen nicht flach wirkt. */
.grev2::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 140% at 50% -20%, rgba(255, 255, 255, 0.06), transparent 60%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.3));
  pointer-events: none;
}

/* ---------------------------------------------------------------- Kopf --- */

.grev2__kopf {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.grev2__eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grev2-leise);
}

.grev2__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border: 1px solid var(--grev2-linie);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 14px;
  font-weight: 600;
  color: var(--grev2-hell);
}
.grev2__badge .grev2-g { width: 18px; height: 18px; }
.grev2__ok {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #6DD59A;
  font-weight: 600;
}
.grev2__ok svg { width: 15px; height: 15px; }

/* Wertungs-Pille: Note, Sternbalken, Anzahl, Beleg. Nur belegte Zahlen. */
.grev2__pille {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border: 1px solid var(--grev2-linie);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
}
.grev2__pille .grev2-g { width: 30px; height: 30px; flex: none; }
.grev2__note {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  color: #FFFFFF;
}
.grev2__pille-rechts { text-align: left; }
.grev2__zahl {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--grev2-weich);
}
.grev2__beleg { display: block; color: var(--grev2-leise); }

/* Sternbalken (Kopf) */
.grev2-balken {
  position: relative;
  display: inline-block;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 2px;
  white-space: nowrap;
  color: var(--grev2-leer);
}
.grev2-balken::before { content: "\2605\2605\2605\2605\2605"; }
.grev2-balken__f {
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--grev2-gold);
}
.grev2-balken__f::before { content: "\2605\2605\2605\2605\2605"; }

/* -------------------------------------------------------------- Laufband -- */

@keyframes grev2-lauf {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.grev2__lauf {
  position: relative;
  overflow: hidden;
  margin-top: 30px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.grev2__spur {
  display: flex;
  width: max-content;
  animation: grev2-lauf var(--grev2-dauer, 108s) linear infinite;
  will-change: transform;
}
.grev2__gruppe { display: flex; gap: 16px; padding-right: 16px; }
.grev2__gruppe > * { flex: none; }
.grev2__lauf:hover .grev2__spur,
.grev2__lauf:focus-within .grev2__spur { animation-play-state: paused; }

/* ---------------------------------------------------------------- Karte --- */

.grev2-karte {
  position: relative;
  flex: 0 0 306px;
  width: 306px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 17px 14px;
  border: 1px solid var(--grev2-linie);
  border-radius: 16px;
  background: var(--grev2-karte);
  box-shadow: 0 18px 40px -34px rgba(0, 0, 0, 0.9);
  text-align: left;
}
.grev2-karte__g {
  position: absolute;
  top: 14px;
  right: 15px;
  width: 20px;
  height: 20px;
}
.grev2-karte__kopf { display: flex; align-items: center; gap: 11px; }
.grev2-karte__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}
.grev2-karte__wer { flex: 1; min-width: 0; }
.grev2-karte__wer b {
  display: block;
  padding-right: 26px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--grev2-hell);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.grev2-karte__wer span {
  display: block;
  font-size: 11.5px;
  color: var(--grev2-leise);
}

.grev2-karte__wertung { display: flex; align-items: center; gap: 10px; }
.grev2-sterne {
  position: relative;
  display: inline-block;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 2px;
  white-space: nowrap;
  color: var(--grev2-leer);
}
.grev2-sterne::before { content: "\2605\2605\2605\2605\2605"; }
.grev2-sterne__f {
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--grev2-gold);
}
.grev2-sterne__f::before { content: "\2605\2605\2605\2605\2605"; }

/* "Empfohlen" steht ausschliesslich neben einer belegten Fuenf-Sterne-Zeile.
   Ohne belegte Sternzahl gibt es weder Sterne noch diesen Chip. */
.grev2-karte__chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid rgba(251, 188, 4, 0.34);
  border-radius: 999px;
  background: rgba(251, 188, 4, 0.12);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #F7CE63;
}

.grev2-karte__zitat {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.58;
  color: var(--grev2-weich);
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* margin-top: auto zieht die Quellenzeile an den Kartenboden. Die Karten einer
   Reihe sind gleich hoch (flex stretch); ohne das klebte die Zeile am Zitat und
   kurze Karten hatten unten ein grosses Loch. */
.grev2-karte__quelle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 0;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--grev2-blau);
}
.grev2-karte__quelle svg { width: 14px; height: 14px; flex: none; }

/* ------------------------------------------------------- Fuss und Knopf --- */

.grev2__fuss {
  margin: 26px auto 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--grev2-leise);
  text-align: center;
}

.grev2__knopfzeile { margin-top: 22px; text-align: center; }
.grev2__knopf {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1px solid var(--grev2-linie);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 15px;
  font-weight: 600;
  color: var(--grev2-hell);
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.grev2__knopf .grev2-g { width: 19px; height: 19px; flex: none; }
.grev2__knopf:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.26);
}
.grev2__knopf:focus-visible { outline: 2px solid var(--grev2-blau); outline-offset: 3px; }

/* ------------------------------------------------------------- Schmales --- */

@media (max-width: 900px) {
  .grev2-karte { flex-basis: 274px; width: 274px; }
}
@media (max-width: 420px) {
  .grev2 { padding-block: 32px 30px; }
  .grev2-karte { flex-basis: 258px; width: 258px; }
  .grev2__pille { gap: 11px; padding: 12px 16px; }
  .grev2__note { font-size: 26px; }
  /* Auf 390px brach der Knopf sonst in zwei Zeilen um. */
  .grev2__knopf { padding: 12px 18px; font-size: 13.5px; gap: 8px; }
  .grev2__knopf .grev2-g { width: 17px; height: 17px; }
  .grev2__badge { font-size: 13px; padding: 7px 14px; }
}

/* ---------------------------------------------------- Bewegung reduziert --- */
/* base.css bremst unter prefers-reduced-motion JEDE Animation ueber den
   Universalselektor (animation-duration: 0.001ms !important). Lukes iPhone hat
   "Bewegung reduzieren" dauerhaft an — ohne diese Ausnahme stuende das Band auf
   seinem Vorfuehrgeraet still. Hoehere Spezifitaet + spaeter geladen = gewinnt. */
@media (prefers-reduced-motion: reduce) {
  .grev2__spur {
    animation-name: grev2-lauf !important;
    animation-duration: var(--grev2-dauer, 108s) !important;
    animation-timing-function: linear !important;
    animation-iteration-count: infinite !important;
    animation-play-state: running !important;
  }
  .grev2__lauf { overflow: hidden !important; }
}

@media print {
  .grev2 { background: #fff; color: #111; border-color: #ccc; }
  .grev2__spur { animation: none !important; }
}
