/* BNXCLOUD Startseiten-Intro (Cavada-Stil: Riesenschriftzug, sanfte Ein-/Ausblende) */
.site-intro {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: #111821;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity .45s ease,
    visibility 0s linear .45s;
}

.site-intro.is-running {
  opacity: 1;
  visibility: visible;
  transition:
    opacity .45s ease,
    visibility 0s;
}

.site-intro.is-closing {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity .75s cubic-bezier(.4, 0, .2, 1),
    visibility 0s linear .75s;
}

.site-intro[hidden] { display: none !important; }

.site-intro__word {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: min(90vw, 1700px);
  margin: 0 auto;
  color: #fff;
  font-family: "Space Grotesk", "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: clamp(52px, 11.5vw, 196px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.035em;
  text-transform: uppercase;
  transform: translateY(-2vh);
}

.site-intro__word span {
  display: inline-block;
  opacity: 0;
  transform: translateY(.55em);
  will-change: transform, opacity;
}

.site-intro.is-running .site-intro__word span {
  animation: introLetterRise 1.05s cubic-bezier(.22, 1, .36, 1) forwards;
  animation-delay: calc(.35s + var(--letter-index) * .075s);
}

.site-intro__word span:nth-child(n+4) { color: var(--bnx-accent, #b0bac4); }

/* Unterlinie unter dem ganzen Wort, waechst nach dem Reveal */
.site-intro__word::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -.18em;
  height: clamp(2px, .35vw, 5px);
  background: var(--bnx-accent, #b0bac4);
  transform: scaleX(0);
  transform-origin: left center;
}

.site-intro__word { position: relative; }

.site-intro.is-running .site-intro__word::after {
  animation: introLineGrow 1.1s cubic-bezier(.65, 0, .35, 1) 1.55s forwards;
}

/* Ausblende: Wort driftet leicht nach oben und skaliert weg */
.site-intro.is-closing .site-intro__word {
  animation: introWordExit .75s cubic-bezier(.4, 0, .2, 1) forwards;
}

.site-intro__skip {
  position: absolute;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  padding: 10px 0;
  color: rgba(255, 255, 255, .55);
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .22);
  border-radius: 0;
  background: transparent;
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  opacity: 0;
  transition: color .2s ease, border-color .2s ease;
}

.site-intro.is-running .site-intro__skip {
  animation: introSkipReveal .5s ease 1.5s forwards;
}

.site-intro.is-closing .site-intro__skip { opacity: 0; }

.site-intro__skip:hover,
.site-intro__skip:focus-visible {
  color: #fff;
  border-color: rgba(255, 255, 255, .7);
}

.site-intro__skip:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 5px;
}

html.intro-active,
html.intro-active body { overflow: hidden; }

@keyframes introLetterRise {
  0% {
    opacity: 0;
    transform: translateY(.55em);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes introLineGrow { to { transform: scaleX(1); } }

@keyframes introSkipReveal { to { opacity: 1; } }

@keyframes introWordExit {
  to {
    opacity: 0;
    transform: translateY(-6vh) scale(1.045);
  }
}

@keyframes siteIntroFailsafe {
  to {
    visibility: hidden;
    pointer-events: none;
  }
}

@media (max-width: 560px) {
  .site-intro__word {
    width: 88vw;
    font-size: clamp(40px, 10.5vw, 90px);
  }

  .site-intro__skip {
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-intro,
  .site-intro.is-closing { transition: none; }
  .site-intro__word span {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .site-intro__word::after { transform: scaleX(1); animation: none; }
  .site-intro.is-closing .site-intro__word { animation: none; }
  .site-intro__skip { opacity: 1; animation: none; }
}
