/* ==========================================================================
   NASHORN – Justizvollzug
   Hero, Sortiment and closing CTA come from Psychiatrie.
   The fastening chapter reuses the Über-uns demand reel.
   Produktdaten reuses the Showroom Außendienst box.
   ========================================================================== */

.jv-page .pk-hero__media img {
  object-position: 72% 50%;
}

/* Flush JUSTIZVOLLZUG to the hero bottom edge without clipping glyphs. */
.jv-page .pk-hero__frame {
  padding-bottom: 0;
}

.jv-page .pk-hero__mark {
  margin-bottom: 0;
  padding-bottom: 0.02em;
}

/* Match all section eyebrows to the Produktdaten eyebrow metrics. */
.jv-page .eyebrow {
  font-size: var(--fs-eyebrow);
  line-height: 1.4;
  letter-spacing: var(--tracking-eyebrow);
}

.jv-range__title {
  max-width: 12em;
  margin: 0 0 clamp(8px, 2vh, 18px);
  color: var(--navy-900);
  font-size: clamp(1.7rem, 2vw, 2.35rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

/* --------------------------------------------------------------------------
   Befestigung — left intro + vertical reel / right light product column
   -------------------------------------------------------------------------- */
.jv-fix {
  /* Same inset as .container.container--wide (layout.css), via 100vw so it
     still resolves correctly when applied inside the half-width left column. */
  --jv-fix-rail: max(
    min(var(--gutter), 40px),
    calc((100vw - min(var(--container-wide), 100vw - 2 * min(var(--gutter), 40px))) / 2)
  );
  --jv-fix-pad-y: clamp(24px, 3.2vh, 40px);
  position: relative;
  z-index: 1;
  background: var(--navy-900);
  color: #fff;
}

.jv-fix__sticky,
.jv-fix__stage {
  position: relative;
}

.jv-fix__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.jv-fix__intro {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  column-gap: clamp(28px, 3.2vw, 56px);
  align-items: end;
  padding:
    clamp(40px, 6vh, 64px)
    clamp(24px, 2.4vw, 40px)
    clamp(56px, 7vh, 80px)
    var(--jv-fix-rail);
}

.jv-fix__intro-title h2 {
  max-width: 11em;
  margin: 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 1.2rem + 1.5vw, 2.85rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.034em;
}

.jv-fix__intro-body {
  max-width: 28em;
  margin: 0;
  color: rgba(214, 228, 236, 0.78);
  font-size: 1.02rem;
  line-height: 1.55;
}

.jv-fix__visual {
  position: relative;
  overflow: hidden;
  background: var(--navy-950);
}

.jv-fix__viewport {
  position: relative;
  overflow: hidden;
  min-height: min(52vh, 440px);
}

.jv-fix__reel {
  --reel: 0;
  position: absolute;
  inset: 0;
}

.jv-fix__frame {
  display: block;
  width: 100%;
  height: min(52vh, 440px);
  object-fit: cover;
  object-position: center;
}

.jv-fix__frame[data-frame="0"] { object-position: 58% 50%; }
.jv-fix__frame[data-frame="1"] { object-position: 92% 50%; }
.jv-fix__frame[data-frame="2"] { object-position: 0% 50%; }
.jv-fix__frame[data-frame="3"] { object-position: 14% 50%; }
.jv-fix__frame[data-frame="4"] { object-position: 8% 50%; }
.jv-fix__frame[data-frame="5"] { object-position: 72% 50%; }

.jv-fix__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 19, 29, 0.08) 0%, rgba(7, 19, 29, 0.28) 100%);
}

.jv-fix__sortiment {
  position: absolute;
  z-index: 2;
  left: var(--jv-fix-rail);
  bottom: var(--jv-fix-pad-y);
  color: #fff;
}

.jv-fix__sortiment .icon {
  color: #7fb8e6;
}

.jv-fix__copy {
  padding: clamp(48px, 7vh, 80px) var(--gutter) clamp(56px, 8vh, 88px);
  color: var(--navy-900);
  background: var(--off-white);
}

.jv-fix__stack {
  position: relative;
}

.jv-fix__head {
  margin-bottom: clamp(24px, 3.4vh, 36px);
}

.jv-fix__sku {
  margin: 0 0 10px;
  color: rgba(13, 28, 39, 0.48);
  font-family: var(--font-ui);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.jv-fix__name {
  margin: 0;
  color: var(--navy-900);
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 2.7vw, 3.1rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
}

.jv-fix__specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 3vh, 32px) clamp(28px, 3vw, 48px);
  max-width: 34rem;
  margin: 0;
}

.jv-fix__specs dt {
  display: grid;
  gap: 12px;
  justify-items: start;
  margin: 0 0 6px;
  color: var(--nashorn-blue);
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.jv-fix__specs dt .icon {
  width: 30px;
  height: 30px;
  stroke-width: 1.3;
  color: var(--nashorn-blue);
}

.jv-fix__specs dd {
  margin: 0;
  color: var(--navy-900);
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.25vw, 1.3rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.jv-fix__more {
  margin-top: clamp(24px, 3.4vh, 36px);
  color: var(--navy-900);
}

.jv-fix__more .icon {
  color: var(--nashorn-blue);
}

@media (min-width: 1200px) and (prefers-reduced-motion: no-preference) {
  .jv-fix.is-cinematic {
    height: 560vh;
  }

  .jv-fix.is-cinematic .jv-fix__sticky {
    position: sticky;
    top: 0;
    height: 100dvh;
    overflow: clip;
  }

  .jv-fix.is-cinematic .jv-fix__stage {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(460px, 0.82fr);
    height: 100%;
  }

  .jv-fix.is-cinematic .jv-fix__main {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    height: 100%;
  }

  .jv-fix.is-cinematic .jv-fix__intro {
    padding:
      calc(var(--header-h) + 12px)
      clamp(24px, 2.4vw, 40px)
      clamp(56px, 6.5vh, 80px)
      var(--jv-fix-rail);
  }

  .jv-fix.is-cinematic .jv-fix__intro-title h2 {
    font-size: clamp(1.7rem, 1.8vw, 2.35rem);
  }

  .jv-fix.is-cinematic .jv-fix__intro-body {
    font-size: 0.98rem;
  }

  .jv-fix.is-cinematic .jv-fix__visual {
    min-height: 0;
    height: 100%;
  }

  .jv-fix.is-cinematic .jv-fix__viewport {
    position: absolute;
    inset: 0;
    min-height: 0;
  }

  .jv-fix.is-cinematic .jv-fix__reel {
    transform: translate3d(0, calc(var(--reel) * -100%), 0);
    transition: transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
  }

  .jv-fix.is-cinematic .jv-fix__frame {
    position: absolute;
    inset: auto 0 auto 0;
    top: calc(var(--i) * 100%);
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .jv-fix.is-cinematic .jv-fix__shade {
    background:
      linear-gradient(180deg, rgba(7, 19, 29, 0.12) 0%, rgba(7, 19, 29, 0) 28%),
      linear-gradient(0deg, rgba(7, 19, 29, 0.42) 0%, rgba(7, 19, 29, 0) 42%);
  }

  .jv-fix.is-cinematic .jv-fix__sortiment {
    left: var(--jv-fix-rail);
    bottom: var(--jv-fix-pad-y);
  }

  .jv-fix.is-cinematic .jv-fix__copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    height: 100%;
    padding:
      calc(var(--header-h) + 28px)
      clamp(40px, 4.2vw, 72px)
      clamp(40px, 5vh, 64px)
      clamp(40px, 4vw, 68px);
  }

  .jv-fix.is-cinematic .jv-fix__stack {
    display: grid;
    flex: none;
    width: 100%;
    min-height: 0;
  }

  .jv-fix.is-cinematic .jv-fix__panel {
    grid-area: 1 / 1;
    opacity: 0;
    filter: blur(6px);
    visibility: hidden;
    transition:
      opacity 620ms cubic-bezier(0.22, 1, 0.36, 1),
      filter 620ms cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0s linear 620ms;
  }

  .jv-fix.is-cinematic .jv-fix__panel.is-active {
    z-index: 1;
    opacity: 1;
    filter: blur(0);
    visibility: visible;
    transition:
      opacity 620ms cubic-bezier(0.22, 1, 0.36, 1),
      filter 620ms cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0s linear 0s;
  }

  .jv-fix.is-cinematic .jv-fix__thumb {
    display: none;
  }
}

.jv-fix__thumb {
  display: none;
}

@media (max-width: 1199.98px), (prefers-reduced-motion: reduce) {
  .jv-fix__intro {
    grid-template-columns: 1fr;
    row-gap: 18px;
  }

  .jv-fix__viewport,
  .jv-fix__shade {
    display: none;
  }

  .jv-fix__visual {
    overflow: visible;
    background: transparent;
  }

  .jv-fix__sortiment {
    position: static;
    display: inline-flex;
    margin: 0 0 28px var(--jv-fix-rail);
  }

  .jv-fix__thumb {
    display: block;
    margin: 0 0 20px;
    overflow: hidden;
  }

  .jv-fix__thumb img {
    width: 100%;
    height: auto;
    max-height: 240px;
    object-fit: cover;
    object-position: center;
  }

  .jv-fix__panel {
    position: relative;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(13, 28, 39, 0.12);
  }

  .jv-fix__panel:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .jv-fix__stack {
    min-height: 0;
  }
}

/* --------------------------------------------------------------------------
   Produktdaten — Showroom Außendienst box on white section ground
   -------------------------------------------------------------------------- */
.ss-field {
  position: relative;
  z-index: 1;
  color: var(--text-dark);
  background: var(--surface-page);
  padding-block: clamp(88px, 9vw, 140px);
}

.jv-page .ss-field {
  background: var(--white);
}

.ss-field__box {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.78fr);
  column-gap: clamp(40px, 6vw, 96px);
  align-items: end;
  padding: clamp(40px, 5vw, 72px);
  background: color-mix(in srgb, var(--nashorn-blue) 14%, #fff);
}

.ss-field__title {
  max-width: 12em;
  margin: 0;
  color: var(--navy-900);
  font-size: clamp(2.4rem, 1.4rem + 2.4vw, 4.25rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.034em;
}

.ss-field__aside {
  padding-bottom: 6px;
  padding-left: clamp(24px, 3vw, 40px);
  border-left: 1px solid rgba(1, 73, 142, 0.22);
}

.ss-field__text {
  max-width: 28em;
  margin: 0 0 28px;
  color: var(--navy-900);
  font-size: 1.0625rem;
  line-height: 1.55;
}

@media (min-width: 1200px) {
  .jv-page .cta .eyebrow {
    justify-content: center;
  }
}

@media (max-width: 1199.98px) {
  .ss-field__box {
    grid-template-columns: 1fr;
  }

  .ss-field__aside {
    margin-top: 28px;
    padding-top: 24px;
    padding-left: 0;
    border-top: 1px solid rgba(1, 73, 142, 0.22);
    border-left: 0;
  }

  .pk-range__visual {
    order: -1;
  }
}
