/* Stage / Hero Block – gleiche Klassen für Editor und Frontend */

.cowp-stage {
  position: relative;
  height: 75vh;
  max-height: 50rem;
  min-height: 40rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cowp-stage__backdrop {
  position: relative;
  flex: 1;
  min-height: 50vh;
  background-size: cover;
  background-position: center;
  background-color: var(--black, #111);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* LCP: preload hint – hidden img so browser fetches backdrop image with high priority */
.cowp-stage__backdrop-preload {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}

.cowp-stage__gradient {
  position: absolute;
  inset: 0;
  transform: matrix(-1, 0, 0, -1, 0, 0);
  /* UI Properties */
  background: transparent linear-gradient(66deg, #FF980000 0%, #FF9800 76%, #E65100 100%) 0% 0% no-repeat padding-box;
  opacity: 0.93;
  pointer-events: none;
}

.cowp-stage__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--wide-size, 80rem);
  margin-inline: auto;
  padding-top: calc(var(--header-height) + 4rem);
  padding-bottom: 8rem;
  padding-inline: var(--layout-space, 1rem);
  color: #fff;

  h1, h2, h3, h4, h5, h6 {
    color: inherit;
  }
}

.cowp-stage__content .cowp-stage__index {
  font-size: 0.9375rem; 
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  text-decoration: underline;
  text-underline-offset: 0.5em;
}

.cowp-stage__content > * {
  margin-bottom: 1.5rem;
  opacity: 0.95;
  max-width: 42ch;
}

.cowp-stage__content .cowp-stage__cta {
  margin-top: 0.5rem;
}

.cowp-stage__scroll-down {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: none;
  border-radius: 50%;
  background: var(--wp--preset--color--indigo-900, #2271b1);
  color: #fff;
  cursor: pointer;
  font: inherit;
  transition: transform 0.2s ease, opacity 0.2s ease;
  animation: scroll-down-animation 1s forwards;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  animation-delay: 0.75s;
}

@keyframes scroll-down-animation {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(2px);
  }
}

.cowp-stage__scroll-down:hover {
  color: #fff;
  opacity: 0.9;
  transform: translateX(-50%) translateY(2px);
}

.cowp-stage__scroll-down-icon {
  display: block;
  line-height: 0;
}

.cowp-stage__scroll-down-icon svg {
  display: block;
}

.cowp-stage__edge {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  line-height: 0;
  pointer-events: none;

  svg {
    width: 100%;
    height: auto;
    max-height: 10rem;
    display: block;
    vertical-align: middle;
    margin-bottom: -1px;
    
    path {
      --_base-delay: 0.25s;

      will-change: transform;
      transform-origin: bottom left;
      animation: edge-animation 1s forwards, edge-idle 5s infinite alternate;
      animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      animation-delay: var(--_base-delay), calc(var(--_base-delay) + 1s);
      transform: scaleY(0);

      &:nth-child(2) {
        animation-delay: var(--_base-delay), calc(var(--_base-delay) + 1.5s);
      }

      &:nth-child(3) {
        animation-delay: var(--_base-delay), calc(var(--_base-delay) + 2s);
      }
    }
  }
}

@keyframes edge-animation {
  0% {
    transform: scaleY(0)
  }
  100% {
    transform: scaleY(1);
  }
}

@keyframes edge-idle {
  0% {
    transform: scaleY(1);
  }
  100% {
    transform: scaleY(0.8);
  }
}

/* Align full/wide */
.cowp-stage.alignfull .cowp-stage__content {
  padding-inline: var(--layout-space, 1rem);
}

.cowp-stage.alignwide .cowp-stage__content {
  max-width: var(--wide-size, 90rem);
}

/* Variant: Kompakt (Orange) – ohne Bild, schmaler */
.cowp-stage--compact-orange {
  height: auto;
  max-height: unset;
  min-height: unset;
}

.cowp-stage--compact-orange .cowp-stage__backdrop {
  background: linear-gradient(90deg, #ff7f27 0%, #ffae35 100%);
  background-color: #ff7f27;
  min-height: auto;
}

.cowp-stage--compact-orange .cowp-stage__gradient {
  opacity: 0;
  pointer-events: none;
}

.cowp-stage--compact-orange .cowp-stage__content {
  padding-top: calc(var(--header-height) + 4rem);
  padding-bottom: 8rem;
}
