/* Infotext CE — editorial layout + prose + scrollytelling (TEN CI, mobile-first) */
.infotext {
  --it-red: #cc0607;
  --it-red-soft: #fdf2f2;
  --it-navy: #1e3a6e;
  --it-navy-soft: #eef2f8;
  --it-blue: #2b8ce6;
  --it-blue-soft: #edf6fd;
  --it-green: #3d9b6e;
  --it-green-soft: #edf7f1;
  --it-orange: #e07a2f;
  --it-orange-soft: #fdf4ec;
  --it-yellow: #f0c419;
  --it-yellow-soft: #fffbea;
  --it-grey: #f4f5f7;
  --it-ink: #1a1a1a;
  --it-muted: #5c6470;
  --it-line: rgba(26, 26, 26, 0.1);
  --it-lh-tight: 1.22;
  --it-lh-normal: 1.48;
  --it-lh-loose: 1.72;
  --it-br-gap: clamp(0.28em, 1.2vw, 0.55em);
  color: var(--it-ink);
}

.frame-type-pxteny_infotext,
.frame-type-pxteny_infotext > .inner,
.frame-type-pxteny_infotext .infotext,
.allcont .frame-type-pxteny_infotext,
section.cont .frame-type-pxteny_infotext {
  overflow: visible !important;
}

/* ------------------------------------------------------------------ prose / RTE */
.infotext__prose {
  font-size: 1rem;
  line-height: var(--it-lh-normal);
  color: var(--it-ink);
  font-variant-ligatures: common-ligatures;
  text-rendering: optimizeLegibility;
}

.infotext__prose p {
  margin: 0 0 0.85em;
}

.infotext__prose p:last-child {
  margin-bottom: 0;
}

.infotext__prose .it-lh-tight,
.infotext__prose.it-lh-tight { line-height: var(--it-lh-tight) !important; }
.infotext__prose .it-lh-normal,
.infotext__prose.it-lh-normal { line-height: var(--it-lh-normal) !important; }
.infotext__prose .it-lh-loose,
.infotext__prose.it-lh-loose { line-height: var(--it-lh-loose) !important; }

/* Blockschrift — responsive breaks, max. 3 Umbrueche */
.infotext__prose .it-caps,
.infotext__prose.it-caps,
.infotext__prose p.it-caps,
.infotext__prose p.uppercase,
.infotext__prose .uppercase,
.infotext__prose span.it-caps,
.infotext__prose span.uppercase {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: clamp(0.8rem, 2.2vw, 0.94rem);
  line-height: 1.34;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: manual;
}

.infotext__prose .it-caps br,
.infotext__prose.it-caps br,
.infotext__prose p.it-caps br,
.infotext__prose p.uppercase br {
  display: block;
  content: "";
  margin-top: var(--it-br-gap);
}

.infotext__prose .it-caps br + br + br + br,
.infotext__prose p.it-caps br + br + br + br,
.infotext__prose p.uppercase br + br + br + br {
  display: none;
}

/* Pull-quote (RTE blockquote button) */
.infotext__prose blockquote,
.infotext__prose .it-pullquote {
  margin: 1.1em 0;
  padding: 0.85em 1em 0.85em 1.15em;
  border: none;
  border-left: 4px solid var(--it-red);
  border-radius: 0 10px 10px 0;
  background: linear-gradient(90deg, rgba(204, 6, 7, 0.06), rgba(204, 6, 7, 0));
  font-size: 1.05em;
  font-style: italic;
  font-weight: 500;
  line-height: 1.45;
  color: var(--it-ink);
}

.infotext__prose blockquote p,
.infotext__prose .it-pullquote p {
  margin: 0;
}

.infotext__prose blockquote::before {
  content: "\201C";
  display: block;
  margin-bottom: 0.15em;
  font-size: 1.6em;
  line-height: 1;
  color: var(--it-red);
  font-style: normal;
  font-weight: 700;
}

/* Quellen — immer ohne Zeilenabstand */
.infotext__sources {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--it-line);
}

.infotext__sources-title {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--it-muted);
}

.infotext__prose--sources,
.infotext__prose--sources p,
.infotext__prose--sources li,
.infotext__sources-body,
.infotext__sources-body p,
.infotext__sources-body li {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  font-size: 0.82rem;
  color: var(--it-muted);
}

.infotext__prose--sources ul,
.infotext__prose--sources ol {
  margin: 0 !important;
  padding-left: 1.1em !important;
  list-style-position: outside;
}

/* ------------------------------------------------------------------ layout */
.infotext__layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

@media (min-width: 1025px) {
  .infotext__layout {
    padding: 0 24px;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 40px 48px;
  }
}

.infotext__main {
  min-width: 0;
}

.infotext__header {
  margin: 0 0 28px;
  max-width: 42em;
}

.infotext__eyebrow {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--it-red);
}

.infotext__headline {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 4.5vw, 2.15rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--it-ink);
}

.infotext__lead {
  margin: 0;
  font-size: clamp(1rem, 2.5vw, 1.08rem);
  color: var(--it-muted);
}

.infotext__blocks {
  display: grid;
  gap: 14px;
}

.infotext__block {
  position: relative;
  padding: 20px 20px 18px;
  border-radius: 14px;
  border: 1px solid var(--it-line);
  background: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 4px 18px rgba(15, 23, 42, 0.04);
  transition: box-shadow 0.2s ease;
}

.infotext__block:hover {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 8px 28px rgba(15, 23, 42, 0.07);
}

.infotext__block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--it-red);
}

.infotext__block--red { background: var(--it-red-soft); border-color: rgba(204, 6, 7, 0.12); }
.infotext__block--red::before { background: var(--it-red); }
.infotext__block--navy { background: var(--it-navy-soft); border-color: rgba(30, 58, 110, 0.12); }
.infotext__block--navy::before { background: var(--it-navy); }
.infotext__block--blue { background: var(--it-blue-soft); border-color: rgba(43, 140, 230, 0.12); }
.infotext__block--blue::before { background: var(--it-blue); }
.infotext__block--green { background: var(--it-green-soft); border-color: rgba(61, 155, 110, 0.12); }
.infotext__block--green::before { background: var(--it-green); }
.infotext__block--orange { background: var(--it-orange-soft); border-color: rgba(224, 122, 47, 0.12); }
.infotext__block--orange::before { background: var(--it-orange); }
.infotext__block--yellow { background: var(--it-yellow-soft); border-color: rgba(240, 196, 25, 0.2); }
.infotext__block--yellow::before { background: var(--it-yellow); }
.infotext__block--grey { background: var(--it-grey); border-color: rgba(26, 26, 26, 0.08); }
.infotext__block--grey::before { background: #9aa0a8; }
.infotext__block--none { background: #fff; }
.infotext__block--none::before { background: var(--it-line); }

.infotext__block-kicker {
  margin: 0 0 5px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--it-muted);
}

.infotext__block-title {
  margin: 0 0 8px;
  font-size: clamp(1.05rem, 2.8vw, 1.18rem);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--it-ink);
}

.infotext__block-text {
  font-size: 0.98rem;
}

.infotext__block-text ul,
.infotext__block-text ol {
  margin: 0.4em 0 0.6em 1.15em;
}

/* ------------------------------------------------------------------ sidebar (decoupled from main column on desktop) */
.infotext__aside {
  position: relative;
}

@media (min-width: 1025px) {
  .infotext__layout {
    align-items: start;
  }

  .infotext__main {
    align-self: start;
  }

  .infotext__aside {
    align-self: start;
    min-height: 0;
  }

  /* Sticky on pin wrapper — transform lives on .infotext__aside-inner (must not be same node) */
  .infotext__aside-pin {
    position: sticky;
    top: var(--infotext-aside-top, 108px);
    z-index: 2;
  }

  .infotext__aside-inner {
    will-change: transform;
    transform: translate3d(0, 0, 0);
  }
}

.infotext__aside-title {
  margin: 0 0 8px;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--it-ink);
}

.infotext__aside-intro {
  margin: 0 0 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--it-muted);
}

.infotext__cards {
  display: grid;
  gap: 12px;
}

@media (min-width: 641px) and (max-width: 1024px) {
  .infotext__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

.infotext__card {
  background: #fff;
  border: 1px solid var(--it-line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease;
  will-change: transform;
}

.infotext__aside--parallax .infotext__card {
  transition: box-shadow 0.2s ease;
}

.infotext__card:hover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.infotext__aside--parallax .infotext__card:hover {
  transform: none;
}

.infotext__card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.infotext__card-link:hover,
.infotext__card-link:focus {
  color: inherit;
  text-decoration: none;
}

.infotext__card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--it-grey);
}

.infotext__card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: translate3d(0, 0, 0) scale(1.08);
  will-change: transform;
}

.infotext__card-title {
  margin: 0;
  padding: 12px 14px 4px;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--it-ink);
}

.infotext__card-text {
  margin: 0;
  padding: 0 14px 14px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--it-muted);
}

.infotext__card-link .infotext__card-title::after {
  content: " →";
  color: var(--it-red);
  font-weight: 700;
}

/* ------------------------------------------------------------------ scrollytelling */
.infotext-scrolly {
  --scrolly-header-offset: 88px;
  --scrolly-intro-progress: 0;
  width: 100vw;
  max-width: 100vw;
  margin: 0 calc(50% - 50vw) 40px;
  box-sizing: border-box;
  color: var(--it-ink);
}

/* Sektion 1 — Intro: fixierter Hintergrund, Titel fade-in beim Scrollen */
.infotext-scrolly__intro {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  padding: clamp(72px, 14vh, 120px) 24px clamp(32px, 8vh, 64px);
  margin-bottom: 8px;
  overflow: hidden;
}

.infotext-scrolly__intro-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.infotext-scrolly__intro-bg-img {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  object-fit: cover;
  transform: scale(calc(1.06 + var(--scrolly-intro-progress) * 0.08));
  transition: transform 0.1s linear;
  will-change: transform;
}

.infotext-scrolly__intro-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.55) 55%, rgba(15, 23, 42, 0.72) 100%),
    radial-gradient(ellipse at 30% 20%, rgba(204, 6, 7, 0.18), transparent 55%);
}

.infotext-scrolly__intro-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  opacity: calc(0.15 + var(--scrolly-intro-progress) * 0.85);
  transform: translate3d(0, calc((1 - var(--scrolly-intro-progress)) * 28px), 0);
  transition: opacity 0.15s linear, transform 0.15s linear;
}

.infotext-scrolly__title {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.infotext-scrolly__lede {
  margin: 0;
  font-size: clamp(1rem, 2.5vw, 1.12rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
}

.infotext-scrolly__intro.is-passed .infotext-scrolly__intro-content {
  opacity: 0;
}

/* Mobile steps (stacked, no pin) */
.infotext-scrolly__mobile {
  display: grid;
  gap: 20px;
  padding: 0 16px 8px;
}

.infotext-scrolly__mobile-step {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--it-line);
  background: #fff;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.infotext-scrolly__step-media {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--it-grey);
}

.infotext-scrolly__step-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.infotext-scrolly__kicker {
  margin: 0 0 4px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--it-red);
}

.infotext-scrolly__step-title {
  margin: 0 0 8px;
  font-size: clamp(1.05rem, 3vw, 1.25rem);
  font-weight: 700;
  line-height: 1.25;
}

/* Desktop stage — hidden on mobile */
.infotext-scrolly__stage {
  display: none;
}

@media (min-width: 900px) {
  .infotext-scrolly {
    margin-bottom: 56px;
  }

  .infotext-scrolly__mobile {
    display: none;
  }

  .infotext-scrolly__stage {
    display: block;
    position: relative;
    padding: 0 24px;
  }

  .infotext-scrolly__stage-scroll {
    position: relative;
  }

  /* Sektion 2 — Bild fixiert, Textpanels legen sich nacheinander darueber */
  .infotext-scrolly__pin {
    position: sticky;
    top: var(--scrolly-header-offset);
    height: calc(100vh - var(--scrolly-header-offset));
    height: calc(100dvh - var(--scrolly-header-offset));
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: clamp(24px, 4vw, 48px);
    align-items: stretch;
    padding-bottom: 24px;
    box-sizing: border-box;
  }

  .infotext-scrolly__visual {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: var(--it-grey);
    box-shadow: 0 20px 56px rgba(15, 23, 42, 0.14);
    transform: translateZ(0);
    will-change: transform;
    height: 100%;
    min-height: 280px;
  }

  .infotext-scrolly__visual.is-overlay-mode {
    box-shadow: 0 28px 72px rgba(15, 23, 42, 0.2);
  }

  .infotext-scrolly__img-wrap {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
  }

  .infotext-scrolly__img-wrap.is-active {
    opacity: 1;
    z-index: 1;
  }

  .infotext-scrolly__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.06);
    transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
  }

  .infotext-scrolly__img-wrap.is-active .infotext-scrolly__img {
    transform: scale(1);
  }

  /* Sektion 3 — Zoom bei Overlay-/Daten-Schritten */
  .infotext-scrolly__img-wrap.is-zooming.is-active .infotext-scrolly__img {
    transform: scale(1.14);
  }

  .infotext-scrolly__img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #eef2f8, #f4f5f7 45%, #edf6fd);
  }

  .infotext-scrolly__panels {
    position: relative;
    min-height: 0;
    height: 100%;
  }

  .infotext-scrolly__panel {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translate3d(0, 32px, 0);
    pointer-events: none;
    transition:
      opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .infotext-scrolly__panel.is-active {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
    z-index: 2;
  }

  .infotext-scrolly__panel.is-leaving {
    opacity: 0;
    transform: translate3d(0, -18px, 0);
  }

  .infotext-scrolly__panel.is-entering {
    opacity: 0.35;
    transform: translate3d(0, 24px, 0);
  }

  .infotext-scrolly__panel-inner {
    width: 100%;
    padding: clamp(20px, 3vw, 32px);
    border-radius: 16px;
    border: 1px solid rgba(26, 26, 26, 0.08);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  }

  .infotext-scrolly__panel--overlay .infotext-scrolly__panel-inner {
    background: rgba(26, 26, 26, 0.82);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.12);
  }

  .infotext-scrolly__panel--overlay .infotext-scrolly__kicker {
    color: #ffb4b4;
  }

  .infotext-scrolly__panel--overlay .infotext-scrolly__step-title,
  .infotext-scrolly__panel--overlay .infotext__prose {
    color: #fff;
  }

  .infotext-scrolly__panel--left + .infotext-scrolly__visual,
  .infotext-scrolly__pin:has(.infotext-scrolly__panel--left.is-active) {
    /* default grid order */
  }
}

@media (max-width: 1024px) {
  .infotext__card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .infotext__card:hover {
    transform: translateY(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .infotext-scrolly__intro-bg-img,
  .infotext-scrolly__intro-content,
  .infotext-scrolly__img-wrap,
  .infotext-scrolly__img,
  .infotext-scrolly__panel,
  .infotext__card,
  .infotext__card-media img,
  .infotext__aside-inner,
  .infotext__aside-pin {
    transition: none !important;
    transform: none !important;
  }

  .infotext-scrolly__panel {
    position: relative;
    opacity: 1;
    pointer-events: auto;
  }

  .infotext-scrolly__panel + .infotext-scrolly__panel {
    margin-top: 16px;
  }

  .infotext-scrolly__img-wrap {
    position: relative;
    opacity: 1;
  }

  .infotext-scrolly__img-wrap + .infotext-scrolly__img-wrap {
    display: none;
  }
}
