/* Flowlee · Projektgalerie (19.10.2026, Idee Dennis: übergroße horizontale Galerie auf Anthrazit)
   Nach der weißen Kette beginnt wieder das Anthrazit des Hero. Ein Projekt füllt ≈ 82 % der Breite,
   das nächste ragt rechts ins Bild; gewischt wird nativ mit Einrasten (scroll-snap), ohne Bibliothek.
   Je Projekt: Computer-Fenster (Rahmen wie im Hero-Showcase) oben, Handy rechts davor; im Freiraum unten links,
   bündig mit der Fensterkante: Firmenname, Branche des Kunden, „Live ansehen“ (Dennis, 19.10.2026).
   Keine Karten, keine Rahmen um die Slides, keine grauen Beschreibungstexte.
   Das erste Projekt fährt leicht vergrößert herein (galerie.js, --eintritt). Darunter die Logos als
   schmale Vertrauensleiste – die Arbeiten wirken, die Logos belegen nur noch. Mobile-first. */

.galerie {
  --g-pad: clamp(20px, 5.6vw, 40px);
  --g-grund: #202124;
  --g-text: #FFFFFF;
  --g-grau: #B8BAC0;
  --g-rahmen: #2B2C31;          /* zurückgenommen: neutrales Dunkelgrau statt Hero-Violett (Dennis, 19.10.) */
  --g-bar: #2B2C31;
  --g-slide: 82%;
  --g-gap: 16px;
  --eintritt: 0;
  background: var(--g-grund);
  color: var(--g-text);
  font-family: "Onest", system-ui, sans-serif;
  padding: 64px 0 0;             /* unten kein Abstand: die Galerie läuft in die Vorstellung aus */
  overflow: hidden;
}

.galerie__titel {
  margin: 0 var(--g-pad) 28px;
  font-weight: 900;
  font-size: clamp(27px, 7.9vw, 34px);
  line-height: 1.06;
  letter-spacing: -0.015em;
}

/* ---------- Die Spur ---------- */

.galerie__spur {
  list-style: none;
  margin: 0;
  padding: 8px var(--g-pad) 8px;
  display: flex;
  gap: var(--g-gap);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--g-pad);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.galerie__spur::-webkit-scrollbar {
  display: none;
}

/* letztes Projekt kann bis an den linken Rand gezogen werden */
.galerie__spur::after {
  content: "";
  flex: 0 0 calc(100% - var(--g-slide) - var(--g-pad));
}

.projekt {
  flex: 0 0 var(--g-slide);
  scroll-snap-align: start;
  min-width: 0;
}

/* Aktives Projekt (im Blick) in voller Größe, Nachbarn treten leicht zurück (galerie.js setzt is-aktiv) */
.projekt__link {
  display: block;
  color: inherit;
  text-decoration: none;
  transform: scale(.96);
  opacity: .72;
  transform-origin: center bottom;
  transition: transform .3s ease, opacity .3s ease;
}

.projekt.is-aktiv .projekt__link {
  transform: scale(1);
  opacity: 1;
}

/* ohne Skript: alles in voller Größe */
.galerie:not(.hat-skript) .projekt__link {
  transform: none;
  opacity: 1;
}

.projekt__link:focus-visible {
  outline: 3px solid #FFFFFF;
  outline-offset: 6px;
  border-radius: 4px;
}

/* ---------- Die Bühne je Projekt: Fenster oben, Handy(s) unten davor ---------- */

/* etwas höher als quadratisch, damit unten links auch ein zweizeiliger Name (FastTuning Wurmsham) Platz hat */
.projekt__buehne {
  position: relative;
  aspect-ratio: 1 / 1.08;
}

/* erstes Projekt: 8 % größer beim Hereinfahren, dann Endgröße */
.projekt:first-child .projekt__buehne {
  transform: scale(calc(1 + 0.08 * (1 - var(--eintritt))));
  transform-origin: left center;
}

.projekt__desktop {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  border-radius: 10px;
  background: var(--g-rahmen);
  padding: 0 2px 2px;
  box-shadow:
    0 0 0 1px rgb(255 255 255 / .08),
    0 24px 48px -18px rgb(0 0 0 / .7);
  overflow: hidden;
}

.projekt__bar {
  height: 18px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  background: var(--g-bar);
}

.projekt__dots {
  display: flex;
  gap: 4px;
}

/* drei stille graue Punkte statt Ampelfarben */
.projekt__dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgb(255 255 255 / .22);
}

.projekt__desktop img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  border-radius: 0 0 8px 8px;
  background: #fff;
}

/* 15 % kleiner als zuvor (34 → 29 %) und leicht über die rechte Kante hinaus, damit mehr Desktop frei bleibt */
.projekt__handy {
  position: absolute;
  right: -3%;
  bottom: 0;
  width: 29%;
  aspect-ratio: 390 / 844;
  border-radius: 14px;
  padding: 3px;
  background: #0D0E11;
  box-shadow:
    0 0 0 1px rgb(255 255 255 / .12),
    0 28px 48px -16px rgb(0 0 0 / .8);
  overflow: hidden;
}

.projekt__handy img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 11px;
  background: #fff;
}

/* ---------- Text im Freiraum unten links, bündig mit der Fensterkante ---------- */

.projekt__text {
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 66%;                    /* bis kurz vor das Handy */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.projekt__name {
  font-weight: 800;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.projekt__branche {
  font-size: 13px;
  line-height: 1.3;
  color: var(--g-grau);
}

.projekt__live {
  margin-top: 6px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  color: #FFFFFF;
  border-bottom: 1px solid rgb(255 255 255 / .4);
  padding-bottom: 2px;
  transition: color .18s ease, border-color .18s ease;
}

.projekt__link:hover .projekt__live,
.projekt__link:active .projekt__live {
  color: #00C8BE;
  border-bottom-color: #00C8BE;
}

/* ---------- Vertrauensleiste: Logos fahren langsam nach rechts, blenden vor beiden Rändern aus ----------
   (Dennis, 19.10.2026). Liste steht viermal im Markup (seit 20.10. – damit auch das breite Desktop-Band lückenlos
   gefüllt ist), die Spur bewegt sich um genau zwei Listenbreiten (−50 %) → nahtlos; 64 s = Tempo wie vorher.
   Keine Trennlinie mehr: zwischen Galerie und Vorstellung steht kein grafisches Element. */

.vertrauen {
  margin: 40px 0 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%);
}

.vertrauen__lauf {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  width: max-content;
  gap: 56px;
  padding-right: 56px;           /* gleicher Abstand nach dem letzten Logo wie zwischen den Logos */
  animation: vertrauen-lauf 44s linear infinite;   /* 22.10.2026: 64 → 44 s, Dennis „etwas schneller“ */
}

/* nach rechts: Startposition −50 % (zweite Hälfte sichtbar), Ende 0 */
@keyframes vertrauen-lauf {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

.vertrauen__lauf li {
  flex: none;
  display: flex;
  align-items: center;
}

.vertrauen__lauf img {
  display: block;
  width: auto;
  height: 34px;
  opacity: .92;
}

.vertrauen__lauf li:nth-child(5n+1) img { height: 46px; }   /* Birring: fast quadratisch */
.vertrauen__lauf li:nth-child(5n+2) img { height: 38px; }   /* Wäscherei Wenden */
.vertrauen__lauf li:nth-child(5n+3) img { height: 28px; }   /* FastTuning: sehr breit */
.vertrauen__lauf li:nth-child(5n+5) img { height: 40px; }   /* Consultingfreaks: zwei Zeilen + Figur (seit 22.10.2026, fünf Logos je Durchlauf) */

@media (prefers-reduced-motion: reduce) {
  .vertrauen__lauf { animation: none; }
}

/* ---------- Tablet / Desktop ---------- */

@media (min-width: 768px) {
  .galerie {
    --g-slide: 56%;
    --g-gap: 32px;
    padding: 112px 0 0;
  }

  .galerie__titel {
    max-width: 760px;
    margin: 0 auto 48px;
    padding: 0 var(--g-pad);
    font-size: 48px;
  }

  .galerie__spur {
    padding-left: max(var(--g-pad), calc((100% - 760px) / 2));
    scroll-padding-inline: max(var(--g-pad), calc((100% - 760px) / 2));
  }

  .projekt__name {
    font-size: 24px;
  }

  .projekt__branche {
    font-size: 15px;
  }

  .projekt__live {
    font-size: 16px;
  }

  .vertrauen {
    margin-top: 64px;
  }

  .vertrauen__lauf { gap: 96px; padding-right: 96px; }
  .vertrauen__lauf img { height: 40px; }
  .vertrauen__lauf li:nth-child(5n+1) img { height: 56px; }
  .vertrauen__lauf li:nth-child(5n+2) img { height: 44px; }
  .vertrauen__lauf li:nth-child(5n+3) img { height: 32px; }
  .vertrauen__lauf li:nth-child(5n+5) img { height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .projekt:first-child .projekt__buehne {
    transform: none;
  }

  .projekt__link {
    transition: none;
    transform: none;          /* nur die Deckung unterscheidet aktiv und Nachbarn */
  }

  .projekt.is-aktiv .projekt__link {
    transform: none;
  }
}
