/* Zahntechnik — fullscreen editorial sticky stack */

/* JS steuert das Scrollen — native Smooth-Animation würde dagegen kämpfen */
html.editorial-page { scroll-behavior: auto; }

/* Header nimmt keinen Fließ-Raum ein → <main> startet bei y=0 */
.editorial-page .site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

.editorial {
  overflow-x: clip;
}

.editorial-panel {
  position: sticky;
  top: 0;
  width: 100vw;
  height: 100svh;
  isolation: isolate;
}

.editorial-panel__frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.editorial-panel__frame picture {
  display: block;
  width: 100%;
  height: 100%;
}

.editorial-panel__img {
  position: absolute;
  left: 0;
  top: -5%;
  width: 100%;
  height: 110%;
  display: block;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transform: scale(1.06);
  transition:
    opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.editorial-panel.is-in .editorial-panel__img {
  opacity: 1;
  transform: scale(1);
}

.editorial-panel__head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  min-height: 100svh;
  padding-top: clamp(5rem, 14vh, 8rem);
  padding-bottom: clamp(3rem, 10vh, 6rem);
  opacity: calc(1 - var(--hero-fade, 0));
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.editorial-panel__head .section-head {
  margin-bottom: 0;
}

.editorial-panel__head .eyebrow {
  margin-bottom: var(--space-element);
}

.editorial-panel__head h1 {
  position: relative;
  isolation: isolate;
  display: inline-block;
  padding: 0 0.06em;
  margin: 0;
}

.editorial-panel__head h1::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.06em;
  right: -0.06em;
  bottom: 0;
  height: 66.666%;
  background: color-mix(in srgb, var(--accent) 36%, transparent);
  border-radius: 0.08em;
}

[data-theme="stubenvoll"] .editorial-panel__head h1::before {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
}

/* Split panel — zwei Bilder nebeneinander */
.editorial-panel--split {
  display: flex;
}

.editorial-panel--split .editorial-panel__frame {
  position: relative;
  inset: auto;
  flex: 0 0 50%;
  height: 100%;
  overflow: hidden;
}

.editorial-panel--split .editorial-panel__frame picture {
  height: 100%;
}

.editorial-panel--hero .editorial-panel__img {
  opacity: 1;
  transform: scale(1);
  transition: none;
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  .editorial-panel__img {
    top: 0;
    height: 100%;
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }

  .editorial-panel__head {
    transition: none;
  }
}
