/* Schleier über den Kulissen: aus der Farbe des Produkts, nur dunkler. */
.detail-page { --detail-shade: color-mix(in srgb, var(--detail-bg) 45%, #05070b); }
.detail-page[data-product-journey] .detail-art { opacity: .92; }
.detail-page[data-product-journey] .detail-hero::before {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--detail-shade) 93%, transparent), color-mix(in srgb, var(--detail-shade) 56%, transparent) 46%, color-mix(in srgb, var(--detail-shade) 16%, transparent) 78%),
    linear-gradient(0deg, var(--detail-bg), transparent 36%);
}
.detail-page[data-product-journey] .detail-reading {
  padding-block: clamp(2rem, 5vw, 4.5rem);
}

.product-journey {
  position: relative;
  isolation: isolate;
  padding-block: clamp(4rem, 9vw, 8rem) clamp(2.5rem, 8vw, 7rem);
  scroll-margin-top: 1rem;
}
.journey-scenery {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.journey-scenery img {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100svh;
  object-fit: cover;
  object-position: center;
}
.journey-scenery::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--detail-bg), transparent 13%, transparent 86%, var(--detail-bg)),
    linear-gradient(90deg, color-mix(in srgb, var(--detail-shade) 64%, transparent), color-mix(in srgb, var(--detail-shade) 46%, transparent) 53%, color-mix(in srgb, var(--detail-shade) 21%, transparent) 100%);
}
.journey-heading { margin-bottom: clamp(2.5rem, 6vw, 5rem); }
.journey-heading h2 {
  margin-block: .65rem .85rem;
  max-width: 19ch;
  font-size: clamp(2.45rem, 5vw, 4.8rem);
  line-height: 1.02;
  text-wrap: balance;
  text-shadow: 0 2px 16px #000a;
}
.journey-intro {
  max-width: 49ch;
  color: var(--detail-ink);
  font-size: clamp(1.05rem, 1.45vw, 1.25rem);
  text-shadow: 0 2px 10px #000;
}
.journey-navigation {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.35rem;
  row-gap: .15rem;
  margin-top: 1rem;
}
.journey-navigation a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--detail-ink);
  font-size: .9rem;
  font-weight: 700;
  text-decoration-color: #ffffff7a;
  text-underline-offset: .3em;
}
.journey-navigation a[aria-current],
.journey-navigation a:hover { color: var(--detail-accent); text-decoration-color: currentColor; }
.journey-chapters { display: grid; gap: clamp(3rem, 8vw, 5.5rem); min-width: 0; }
.journey-chapter { min-width: 0; scroll-margin-top: 3rem; }
.has-journey-film .journey-heading {
  display: grid;
  align-content: end;
  min-height: clamp(14rem, 43svh, 29rem);
}
.journey-film {
  --film-chapters: 3;
  --film-scroll-distance: calc(clamp(25rem, 86svh, 50rem) * var(--film-chapters) / 3);
  position: relative;
}
.journey-film-marker {
  position: absolute;
  top: calc(var(--static-moment, 0) * (100% - 8rem));
}
.journey-film.has-scroll-clip { min-height: calc(100svh + var(--film-scroll-distance)); }
.has-scroll-clip .journey-film-marker { top: calc(var(--moment, 0) * var(--film-scroll-distance) + 3px); }
.has-scroll-clip .journey-film-stage {
  position: sticky;
  top: 0;
  display: grid;
  align-content: center;
  min-height: 100svh;
  padding-top: var(--product-bar, 0px);
}
.journey-film-figure { margin-block: 0; color: var(--detail-ink); }
.journey-film-screen {
  width: min(100%, 64rem, calc((100svh - var(--product-bar, 0px)) * 1.28));
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--detail-accent) 40%, transparent);
  border-radius: .75rem;
  background: var(--detail-bg);
  box-shadow: 0 1rem 4rem #03070caa;
}
.journey-film-figure figcaption {
  display: grid;
  justify-items: center;
  gap: .55rem;
  padding-block: .9rem;
  text-align: center;
  text-shadow: 0 2px 8px #03070c;
}
.journey-film-figure figcaption strong {
  color: var(--detail-accent);
  font-size: clamp(1.18rem, 3vw, 2.25rem);
  line-height: 1.15;
}
.journey-film-transcript { max-width: 55ch; }
.has-scroll-clip .journey-film-transcript {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.journey-film-figure [data-scroll-replay] { color: var(--detail-accent); }
.journey-copy {
  position: relative;
  isolation: isolate;
  max-width: 43ch;
}
.journey-copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -1.25rem -1.35rem -1.35rem;
  background: radial-gradient(ellipse at 38% 50%, color-mix(in srgb, var(--detail-shade) 72%, transparent) 0%, color-mix(in srgb, var(--detail-shade) 49%, transparent) 47%, transparent 74%);
  pointer-events: none;
}
.journey-number { margin-right: .75rem; }
.journey-copy h3 {
  margin-block: .68rem 1rem;
  font-size: clamp(1.95rem, 3.55vw, 3.65rem);
  line-height: 1.04;
  text-wrap: balance;
  text-shadow: 0 2px 16px #0009;
}
.journey-copy p {
  max-width: 39ch;
  color: var(--detail-ink);
  font-size: clamp(1.05rem, 1.4vw, 1.22rem);
  line-height: 1.6;
  text-shadow: 0 2px 10px #000;
}
.journey-chapter > img,
.journey-frames img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border: 1px solid #ffffff4d;
  border-radius: 10px;
  background: var(--detail-bg);
  box-shadow: 0 26px 68px #0007;
}
.journey-chapter > img { margin-top: 1.5rem; }
.journey-stage { display: none; }
.journey-track.journey-sticky {
  display: grid;
  grid-template-columns: minmax(19rem, .88fr) minmax(0, 1.42fr);
  gap: clamp(2.75rem, 5vw, 5.25rem);
}
.journey-sticky .journey-stage {
  display: block;
  position: sticky;
  top: max(4rem, calc(50svh - 14vw));
  align-self: start;
  margin-top: 8svh;
}
.journey-sticky .journey-chapters { gap: 0; padding-bottom: 9svh; }
.journey-sticky .journey-chapter {
  display: grid;
  align-content: center;
  min-height: max(53svh, 400px);
}
.journey-sticky .journey-chapter > img {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  margin: 0;
}
.journey-frames {
  display: grid;
  isolation: isolate;
  grid-template-areas: "frame";
}
.journey-frames img {
  grid-area: frame;
  opacity: 0;
  transform: translateY(12px) scale(.982);
  transition: opacity .52s ease, transform .66s cubic-bezier(.22,.68,.29,1);
}
.journey-frames img.is-current { z-index: 1; opacity: 1; transform: none; }
.journey-stage figcaption {
  margin-top: .8rem;
  color: var(--detail-ink);
  font: 700 .75rem/1.4 var(--heading);
  letter-spacing: .12em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px #000;
}
.detail-page[data-product-journey="rift-crawl"] .journey-sticky {
  grid-template-columns: minmax(0, 1.42fr) minmax(19rem, .88fr);
}
.detail-page[data-product-journey="rift-crawl"] .journey-sticky .journey-stage { grid-area: 1 / 1; }
.detail-page[data-product-journey="rift-crawl"] .journey-sticky .journey-chapters { grid-area: 1 / 2; }

@media (max-width: 1039px) {
  .journey-heading { margin-bottom: 2.5rem; }
  .journey-scenery::after {
    background: linear-gradient(180deg, var(--detail-bg), color-mix(in srgb, var(--detail-shade) 40%, transparent) 12%, color-mix(in srgb, var(--detail-shade) 47%, transparent) 85%, var(--detail-bg));
  }
}
@media (max-width: 760px) {
  .detail-page[data-product-journey] .detail-hero::before {
    background: linear-gradient(180deg, color-mix(in srgb, var(--detail-shade) 74%, transparent) 0%, color-mix(in srgb, var(--detail-shade) 46%, transparent) 63%, var(--detail-bg));
  }
}
@media (max-width: 1039px) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .journey-chapter > img {
      animation: journey-appear ease-out both;
      animation-timeline: view();
      animation-range: entry 0% entry 90%;
    }
    @keyframes journey-appear {
      from { opacity: .72; transform: translateY(16px) scale(.98); }
      to { opacity: 1; transform: none; }
    }
  }
}

/* Begleitsatz zum aktuellen Kapitel des Scrollfilms. */
.journey-film-text { max-width: 46ch; min-height: 3.1em; font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.5; }
.journey-film:not(.has-scroll-clip) .journey-film-text { display: none; }

/* Wer macht was: Lehrkraft, Lernende, Spiel. */
.journey-roles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .9rem 1.6rem;
  max-width: 62rem;
  margin: 1.4rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid #ffffff3d;
}
.journey-roles[hidden] { display: none; }
.journey-roles dt {
  margin-bottom: .2rem;
  color: var(--detail-accent);
  font: 700 .75rem/1.4 var(--heading);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.journey-roles dd { margin: 0; color: var(--detail-ink); font-size: .98rem; line-height: 1.45; text-shadow: 0 2px 10px #000; }
@media (max-width: 760px) {
  .journey-roles { grid-template-columns: 1fr; gap: .7rem; }
}

/* Lesbarer Ausschnitt der Spielanzeige auf schmalen Bildschirmen. */
.journey-film-zoom { display: none; }
@media (max-width: 760px) {
  .has-scroll-clip .journey-film-zoom {
    display: block;
    width: min(100%, 64rem);
    aspect-ratio: var(--zoom-aspect, 5) / 1;
    margin: .6rem auto 0;
    border: 1px solid #ffffff59;
    border-radius: .5rem;
    background-color: #0b111c;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity .3s ease;
  }
  .has-scroll-clip .journey-film-zoom.is-shown { opacity: 1; }
}

.journey-film:not(.has-scroll-clip) .journey-film-zoom { display: none; }
@media (max-width: 760px) { .has-scroll-clip .journey-film-figure figcaption strong { min-height: 2.3em; display: grid; align-items: end; } }

.journey-link { margin-top: .9rem; min-height: 44px; color: var(--detail-accent); text-decoration: underline; text-underline-offset: .3em; }

/* Ansicht ohne Scrollfilm: Bild für Bild mit eigenem Titel und Satz. */
.journey-frame-note { margin: 0; padding: .1rem 1rem 1.1rem; color: var(--detail-ink); font-size: 1rem; line-height: 1.5; }
.journey-frame-note strong { display: block; color: var(--detail-accent); font-size: 1.15rem; line-height: 1.25; margin-bottom: .2rem; }
.has-scroll-clip .journey-frame-note { display: none; }
.journey-film:not(.has-scroll-clip) .journey-film-transcript,
.journey-film:not(.has-scroll-clip) [data-scroll-caption] { display: none; }
.journey-film:not(.has-scroll-clip) .journey-film-screen { width: min(100%, 52rem); }
