/* Kapitel 06: Gebaut für Ihren Betrieb. Das Kapitel ist flush, der Kapitelkopf bringt seinen Abstand mit.
   Dann die gepinnte Szene: das Branchenfoto liegt vollflächig hinter einem Schleier, der links dicht und
   rechts offen ist, fährt mit --progress langsam näher und blendet je Schritt über. Links auf sechs
   Spalten der Text mit geführtem Auge (Kapitelzeile Mint, Headline Text, Absatz Text-2, Pillen still,
   Kennzahl Mint, Logos in Originalfarben auf weißem Plättchen), unten die Navigation auf dem Raster.
   Unter 680 px und ohne Bewegung: keine Szene, fünf gestapelte Karten mit Bild. */
.industries-head {
  padding: var(--chapter-y) 0 clamp(48px, 6vw, 80px);
}

/* ---------- Bühne ---------- */
.industries-stage {
  background: var(--ink);
}

.industries-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.industries-backdrop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% 50%;
  opacity: 0;
  transform: scale(calc(1.06 + var(--progress, 0) * 0.08)) translate3d(calc(var(--progress, 0) * -2%), 0, 0);
  transform-origin: 70% 50%;
  transition: opacity 600ms var(--ease);
  filter: saturate(0.9) brightness(0.86);
}

.industries-backdrop img.is-active {
  opacity: 1;
}

.industries-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(5, 12, 13, 0.97) 0%, rgba(5, 12, 13, 0.9) 30%, rgba(5, 12, 13, 0.56) 52%, rgba(5, 12, 13, 0.16) 74%, rgba(5, 12, 13, 0.04) 100%),
    linear-gradient(180deg, rgba(5, 12, 13, 0.66), rgba(5, 12, 13, 0) 22%, rgba(5, 12, 13, 0) 64%, rgba(5, 12, 13, 0.82) 100%);
}

.industries-layout {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  min-height: 100svh;
  padding: calc(var(--header-h) + var(--s3)) 0 152px;
}

.industries-steps {
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  column-gap: var(--gutter);
}

.industries-panel {
  grid-column: 1 / span 6;
  display: grid;
}

.industries-step {
  grid-area: 1 / 1;
  display: grid;
  align-content: center;
  gap: 20px;
}

.industries-step__media {
  display: none;
  margin: 0;
}

.industries-step .t-h2 {
  color: var(--text);
}

.industries-step .t-lead {
  max-width: 34rem;
  margin: 0;
}

.industries-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.industries-pills li {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 7px 14px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
}

/* Kennzahl und Referenzen auf einer Zeile mit Haarlinie darüber, unten bündig. */
.industries-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 40px;
  margin-top: 8px;
  border-top: 1px solid var(--line-strong);
  padding-top: 24px;
}

.industries-facts .metric strong {
  color: var(--accent);
  font-size: clamp(40px, 3.8vw, 56px);
}

.industries-facts .metric span {
  max-width: 24ch;
}

.industries-references {
  display: grid;
  gap: 10px;
  justify-items: start;
}

/* Referenzlogos in Originalfarben auf weißem Plättchen; Höhe je Marke, damit sie optisch gleich wiegen. */
.industries-plate {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  border-radius: var(--radius);
  padding: 10px 16px;
  background: #fff;
}

.industries-plate img {
  width: auto;
  max-width: 120px;
  height: 22px;
  object-fit: contain;
}

.industries-plate .industries-logo--melitta {
  height: 30px;
}

.industries-plate .industries-logo--ritter {
  height: 34px;
}

.industries-plate .industries-logo--roth,
.industries-plate .industries-logo--moeller {
  height: 20px;
}

.industries-plate .industries-logo--kaco {
  height: 26px;
}

.industries-plate .industries-logo--siblik {
  height: 18px;
}

.industries-plate .industries-logo--jpc {
  height: 30px;
}

/* Folie 05: drei Zahlen in Weiß, der Primär-Knopf ist hier der Blickfang. */
.industries-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 44px;
  margin-top: 8px;
  border-top: 1px solid var(--line-strong);
  padding-top: 24px;
}

.industries-numbers .metric strong {
  font-size: clamp(30px, 2.6vw, 40px);
}

.industries-numbers .metric span {
  max-width: 16ch;
}

.industries-step .button {
  justify-self: start;
  margin-top: 4px;
}

/* ---------- Navigation ---------- */
.industries-nav {
  position: absolute;
  right: 0;
  bottom: 44px;
  left: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  column-gap: var(--gutter);
  margin: 0;
  padding: 0;
  list-style: none;
}

.industries-nav li {
  grid-column: span 2;
}

.industries-nav button {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: none;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: color 300ms ease;
}

.industries-nav button:hover,
.industries-nav button[aria-pressed="true"] {
  color: var(--text);
}

.industries-nav__bar {
  position: relative;
  display: block;
  height: 2px;
  margin-bottom: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
}

/* Nur die gezeichnete Länge ändert sich; die Breite bleibt für das Layout konstant. */
.industries-nav__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 100%;
  transform: scaleX(var(--segment-progress, 0));
  transform-origin: left;
  background: var(--accent);
}

.industries-nav__index {
  margin-right: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .industries-panel {
    grid-column: 1 / span 7;
  }
}

@media (max-width: 900px) {
  .industries-panel {
    grid-column: 1 / -1;
  }

  /* Ohne freie rechte Hälfte liegt der Text auf dem Bild: der Schleier wird flächig. */
  .industries-veil {
    background: linear-gradient(180deg, rgba(5, 12, 13, 0.92), rgba(5, 12, 13, 0.8) 55%, rgba(5, 12, 13, 0.94) 100%);
  }

  .industries-layout {
    padding-bottom: 176px;
  }

  .industries-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 24px;
  }

  .industries-nav li {
    flex: 0 0 auto;
  }

  .industries-nav button {
    min-width: 120px;
  }
}

/* Flache Viewports (Laptops): Folie 05 mit drei Zahlen und Knopf muss über der Navigation Platz haben. */
@media (min-width: 681px) and (max-height: 820px) {
  .industries-layout {
    padding-top: calc(var(--header-h) + 8px);
    padding-bottom: 120px;
  }

  .industries-step {
    gap: 14px;
  }

  .industries-step .t-h2 {
    font-size: clamp(32px, 4vw, 50px);
  }

  .industries-facts,
  .industries-numbers {
    padding-top: 18px;
  }

  .industries-nav {
    bottom: 28px;
  }
}

/* ---------- Gestapelt: unter 680 px und ohne Bewegung ---------- */
@media (max-width: 680px), (prefers-reduced-motion: reduce) {
  .industries-scene {
    height: auto;
  }

  .industries-stage {
    position: static;
    height: auto;
    overflow: visible;
  }

  .industries-backdrop,
  .industries-veil,
  .industries-nav {
    display: none;
  }

  .industries-layout {
    display: block;
    min-height: 0;
    padding: 0 0 var(--chapter-y);
  }

  .industries-steps {
    display: block;
  }

  /* Eine Spur in Satzspiegelbreite statt einer auto-Spur: sonst wächst die Karte mit dem Bild über den Rand. */
  .industries-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .industries-step,
  .industries-step.scene-step {
    grid-area: auto;
    min-width: 0;
    max-width: 100%;
    gap: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding-bottom: 24px;
    background: var(--surface);
    opacity: 1;
    transform: none;
    transition: none;
    pointer-events: auto;
  }

  .industries-step > * {
    margin-inline: 20px;
  }

  .industries-step__media {
    display: block;
    aspect-ratio: 21 / 9;
    margin: 0 0 8px;
  }

  .industries-step__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .industries-step .button {
    justify-self: stretch;
  }
}

@media (max-width: 680px) {
  .industries-step__media {
    aspect-ratio: 4 / 5;
  }

  /* «täglichen Vorsprung.» ist durch das geschützte Leerzeichen ein Block und muss in 20-px-Ränder passen. */
  .industries-step .t-h2 {
    font-size: clamp(28px, 8vw, 34px);
  }

  .industries-facts {
    gap: 18px 28px;
  }

  .industries-plate {
    flex-wrap: wrap;
    gap: 16px 20px;
  }

  .industries-numbers {
    gap: 16px 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .industries-backdrop img {
    transform: none;
    transition: none;
  }

  .industries-nav button {
    transition: none;
  }
}
