/* ==========================================================================
   Titelseite: Slider, Logo, Texte je Slide, Download-Karten
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  background: var(--dark);
  color: var(--white);
}
/* Abdunklung links für lesbare Texte */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(20, 24, 22, 0.78) 0%,
    rgba(20, 24, 22, 0.35) 48%,
    rgba(20, 24, 22, 0) 70%
  );
}

.hero__inner {
  min-height: 100vh;
  padding-block: clamp(20px, 4vh, 40px);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 3vh, 32px);
}
.hero__logo,
.hero__bottom {
  position: relative;
  z-index: 2;
}

.hero__logo {
  align-self: flex-start;
}
.hero__logo img {
  height: clamp(72px, 14vh, 136px);
  width: auto;
  filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.35));
  animation: logo-in 1.2s var(--ease-out) both;
}
@keyframes logo-in {
  from {
    opacity: 0;
    transform: translate3d(0, -14px, 0) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Slides: alle liegen übereinander, die aktive ist sichtbar */
/* Kein z-index hier: sonst lägen die Bilder über Abdunklung und Mesh */
.hero__slides {
  flex: 1 1 auto;
  display: grid;
  align-items: center;
}
.hero__slide {
  grid-area: 1 / 1;
}

.hero__img {
  position: absolute;
  inset: -4%;
  z-index: 0;
  width: 108%;
  height: 108%;
  max-width: none;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
  will-change: opacity, transform;
  backface-visibility: hidden;
}
.hero__slide.is-active .hero__img {
  opacity: 1;
  animation: kenburns 30s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite
    alternate;
}
@keyframes kenburns {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-1.5%, -1%, 0) scale(1.08);
  }
}

.hero__copy {
  position: relative;
  z-index: 2;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2vh, 18px);
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition:
    opacity 0.9s ease,
    transform 0.9s var(--ease-out);
}
.hero__slide.is-active .hero__copy {
  opacity: 1;
  transform: none;
}
.hero__copy .eyebrow {
  color: #c6e3a8;
}
.hero__copy h2 {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(30px, 5.4vh, 48px);
  line-height: 1.08;
}
.hero__copy p:last-child {
  max-width: 520px;
  font-size: clamp(15px, 2.1vh, 18px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
}

/* Ohne JS: nur erste Slide zeigen */
html:not(.js) .hero__slide:first-child .hero__img,
html:not(.js) .hero__slide:first-child .hero__copy {
  opacity: 1;
  transform: none;
}

/* Animiertes Mesh rechts unten */
.hero__mesh {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: min(46vw, 640px);
  height: auto;
  pointer-events: none;
}

/* Unterer Bereich: Downloads + Slide-Auswahl */
.hero__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.download-card {
  width: 290px;
  padding: clamp(14px, 2.4vh, 22px) 52px clamp(16px, 2.6vh, 24px) 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--ink);
  transition: transform 0.25s;
}
.download-card:hover {
  transform: translateY(-4px);
}
.download-card h3 {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.15;
}
.download-card .btn {
  margin-top: 8px;
  align-self: flex-start;
}

.hero__nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.hero__label {
  font-family: var(--font-head);
  font-size: 15px;
  letter-spacing: 0.12em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}
.hero__dots {
  display: flex;
  gap: 4px;
}
.hero__dots button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__dots button::before {
  content: "";
  width: 18px;
  height: 16px;
  background: var(--white);
  clip-path: polygon(
    50% 0,
    100% 100%,
    0 100%,
    50% 0,
    50% 18%,
    15% 88%,
    85% 88%,
    50% 18%
  );
  transition: background 0.2s;
}
.hero__dots button.is-active::before {
  background: var(--green-300);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

@media (max-width: 820px) {
  .hero__mesh {
    opacity: 0.5;
  }
  .download-card {
    width: 100%;
  }
}
