/* Homepage scrollfilm: alleen de bestaande hero en afsluitende CTA worden sticky.
   Zonder JavaScript of met reduced motion blijven het gewone, leesbare secties. */
.scroll-story__stage,
.scroll-story__panels {
  display: contents;
}

.scroll-story__media {
  overflow: hidden;
}

.scroll-story__media video,
.scroll-story__poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scroll-story__media video,
.scroll-story__poster,
.scroll-story__scrim {
  position: absolute;
  inset: 0;
}

.scroll-story__media video {
  z-index: 1;
  opacity: 0;
  transition: opacity .18s ease;
}

.scroll-story__poster {
  z-index: 0;
  transition: opacity .18s ease;
}

.scroll-story__scrim {
  z-index: 2;
  pointer-events: none;
}

.scroll-story--opening .scroll-story__scrim {
  background: linear-gradient(90deg, rgba(251, 248, 241, .78) 0%, rgba(251, 248, 241, .38) 34%, transparent 62%);
}

.scroll-story--ending .scroll-story__scrim {
  background: linear-gradient(90deg, rgba(251, 248, 241, .9) 0%, rgba(251, 248, 241, .62) 22%, rgba(251, 248, 241, .12) 39%, transparent 48%);
}

.scroll-story.is-video-ready .scroll-story__media video {
  opacity: 1;
}

.scroll-story.is-video-ready .scroll-story__poster {
  opacity: 0;
}

.scroll-story.has-video-error .scroll-story__media video {
  opacity: 0;
}

.scroll-story.has-video-error .scroll-story__poster {
  opacity: 1;
}

html.story-enhanced .scroll-story {
  display: block;
  min-height: 0;
  padding: 0;
  overflow: visible;
}

html.story-enhanced .scroll-story--opening {
  height: 300svh;
  height: 300dvh;
}

html.story-enhanced .scroll-story--ending {
  height: 240svh;
  height: 240dvh;
}

html.story-enhanced .scroll-story__stage {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  width: 100%;
  height: 100svh;
  height: 100dvh;
  min-height: 0;
  padding: 5.8rem clamp(1.2rem, 8vw, 10rem) 1.4rem;
  overflow: hidden;
  background: var(--paper-surface);
}

html.story-enhanced .scroll-story--ending .scroll-story__stage {
  padding: clamp(5rem, 10vw, 8rem) max(var(--gutter), calc((100vw - 1200px) / 2));
}

html.story-enhanced .scroll-story__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  min-height: 0;
}

html.story-enhanced .scroll-story__media video,
html.story-enhanced .scroll-story__poster {
  object-position: 52% 50%;
}

html.story-enhanced .scroll-story--ending .scroll-story__media video,
html.story-enhanced .scroll-story--ending .scroll-story__poster {
  object-position: center;
}

html.story-enhanced .scroll-story__panels {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  pointer-events: none;
}

html.story-enhanced .scroll-story__panel {
  position: absolute;
  top: 50%;
  left: clamp(1.2rem, 8vw, 10rem);
  margin: 0;
  opacity: var(--story-copy-progress, 0);
  pointer-events: none;
  transform: translateY(-50%);
  will-change: opacity;
}

html.story-enhanced [data-copy-static] .scroll-story__panel {
  opacity: 1;
}

html.story-enhanced .scroll-story.is-copy-visible .scroll-story__panel {
  pointer-events: auto;
}

html.story-enhanced .scroll-story--opening .hero-copy {
  width: min(520px, calc(100% - 2.4rem));
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid rgba(28, 43, 46, .28);
  background: rgba(251, 248, 241, .8);
  box-shadow: .45rem .5rem 0 rgba(18, 82, 91, .16);
  clip-path: polygon(0 0, calc(100% - 1.1rem) 0, 100% 1.1rem, 100% 100%, 0 100%);
  filter: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html.story-enhanced .scroll-story--opening .hero-copy::before {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
  background: rgba(244, 200, 75, .7);
}

html.story-enhanced .scroll-story--opening .hero-copy::after {
  display: none;
}

html.story-enhanced .scroll-story--opening :is(h1, .eyebrow, .lead, .proof, .text-link) {
  text-shadow: none;
}

html.story-enhanced .scroll-story--opening .eyebrow {
  font-size: clamp(.84rem, .85vw, .94rem);
  font-weight: 750;
  letter-spacing: .035em;
}

html.story-enhanced .scroll-story--opening .lead {
  max-width: 34rem;
  font-size: clamp(1.16rem, 1.28vw, 1.28rem);
  font-weight: 550;
  line-height: 1.52;
}

html.story-enhanced .scroll-story--opening .proof {
  font-size: clamp(.96rem, .78vw, 1.04rem);
  font-weight: 750;
  line-height: 1.48;
}

html.story-enhanced .scroll-story--ending .closing-content {
  left: clamp(2rem, 4.8vw, 6rem);
  align-items: flex-start;
  width: min(21rem, 27vw);
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid rgba(28, 43, 46, .28);
  background: rgba(251, 248, 241, .8);
  box-shadow: .45rem .5rem 0 rgba(18, 82, 91, .16);
  clip-path: polygon(0 0, calc(100% - 1.1rem) 0, 100% 1.1rem, 100% 100%, 0 100%);
  filter: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  text-align: left;
}

html.story-enhanced .scroll-story--ending .closing-content::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1.1rem;
  height: 1.1rem;
  background: rgba(244, 200, 75, .7);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
  pointer-events: none;
}

html.story-enhanced .scroll-story--ending .closing-content h2 {
  max-width: 9ch;
}

html.story-enhanced .scroll-story--ending .closing-content :is(h2, p) {
  text-shadow: none;
}

html.story-enhanced .scroll-story--ending::after {
  display: none;
}

html.story-enhanced .scroll-story--opening .scroll-story__scrim,
html.story-enhanced .scroll-story--ending .scroll-story__scrim {
  background: none;
}

@media (max-width: 960px), (max-width: 1180px) and (max-height: 600px) and (orientation: landscape) {
  .scroll-story__assistive-copy:focus-within {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    z-index: 120;
    width: auto;
    height: auto;
    margin: 0;
    padding: 1rem;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: var(--cream);
    border: 1px solid rgba(28, 43, 46, .18);
    box-shadow: 0 .8rem 2rem rgba(28, 43, 46, .18);
  }

  .scroll-story__assistive-copy:focus-within :is(h2, p) {
    margin: 0 0 .65rem;
  }

}

@media (max-width: 960px) and (orientation: portrait) {
  html.story-enhanced .scroll-story--opening {
    height: 360svh;
  }

  html.story-enhanced .scroll-story--ending {
    height: 300svh;
  }

  html.story-enhanced .scroll-story__stage,
  html.story-enhanced .scroll-story--ending .scroll-story__stage {
    display: flex;
    align-items: flex-end;
    height: 100svh;
    padding: 0;
  }

  html.story-enhanced .scroll-story__media {
    position: absolute;
    inset: 0;
    min-width: 0;
  }

  html.story-enhanced .scroll-story__media video,
  html.story-enhanced .scroll-story__poster {
    object-position: 55% 50%;
  }

  html.story-enhanced .scroll-story--ending .scroll-story__media video,
  html.story-enhanced .scroll-story--ending .scroll-story__poster {
    object-position: center;
  }

  html.story-enhanced .scroll-story--opening .scroll-story__scrim,
  html.story-enhanced .scroll-story--ending .scroll-story__scrim {
    background: none;
  }

  html.story-enhanced .scroll-story__panels {
    position: absolute;
    inset: 0;
    background: none;
  }

  html.story-enhanced .scroll-story__panel,
  html.story-enhanced .scroll-story--ending .closing-content {
    top: auto;
    left: 50%;
    bottom: max(1rem, env(safe-area-inset-bottom));
    width: min(34rem, calc(100% - 2rem));
    transform: translateX(-50%);
  }

  html.story-enhanced .scroll-story--opening .hero-copy {
    width: min(34rem, calc(100% - 2rem));
    max-width: none;
  }

  html.story-enhanced .scroll-story--opening :is(h1, .eyebrow, .lead, .proof, .text-link),
  html.story-enhanced .scroll-story--ending .closing-content :is(h2, p) {
    -webkit-text-stroke: 0;
    paint-order: normal;
    text-shadow: none;
  }

  html.story-enhanced .scroll-story--ending .closing-content {
    top: auto;
    bottom: max(1rem, env(safe-area-inset-bottom));
    align-items: center;
    text-align: center;
    transform: translateX(-50%);
  }

  html.story-enhanced .scroll-story--ending .closing-content h2 {
    max-width: 11ch;
  }

  html.story-enhanced .scroll-story--opening h1 {
    max-width: 12ch;
    font-size: clamp(2.35rem, 7vw, 3.7rem);
  }
}

@media (max-width: 520px) and (orientation: portrait) {
  html.story-enhanced .scroll-story--opening .hero-copy {
    bottom: max(.35rem, env(safe-area-inset-bottom));
    width: calc(100% - 1.4rem);
    padding: .9rem;
  }

  html.story-enhanced .scroll-story--opening h1 {
    max-width: 12ch;
    font-size: clamp(2.05rem, 9.5vw, 2.45rem);
    line-height: 1.03;
  }

  html.story-enhanced .scroll-story--opening .eyebrow {
    display: none;
  }

  html.story-enhanced .scroll-story--opening .lead {
    max-width: 32ch;
    margin-top: .55rem;
    font-size: .94rem;
    font-weight: 650;
    line-height: 1.42;
  }

  html.story-enhanced .scroll-story--opening .actions {
    margin-top: .7rem;
  }

  html.story-enhanced .scroll-story--opening .button {
    min-height: 2.8rem;
    padding: .65rem 1rem;
    font-size: .83rem;
  }

  html.story-enhanced .scroll-story--opening .text-link,
  html.story-enhanced .scroll-story--opening .proof {
    display: none;
  }

  html.story-enhanced .scroll-story--ending .closing-content {
    bottom: max(.35rem, env(safe-area-inset-bottom));
    width: calc(100% - 1.4rem);
    padding: .9rem;
  }

  html.story-enhanced .scroll-story--ending .closing-content h2 {
    margin-bottom: .55rem;
    font-size: clamp(2.15rem, 10vw, 2.65rem);
  }

  html.story-enhanced .scroll-story--ending .closing-content p {
    margin-bottom: .55rem;
    font-size: .88rem;
    line-height: 1.4;
  }

  html.story-enhanced .scroll-story--ending .closing-proof {
    display: none;
  }

  html.story-enhanced .scroll-story--ending .closing-content .button {
    margin-top: .45rem;
    margin-bottom: 0;
  }
}

@media (max-width: 520px) and (max-height: 650px) and (orientation: portrait) {
  html.story-enhanced .scroll-story--opening .hero-copy {
    bottom: max(.55rem, env(safe-area-inset-bottom));
    padding: .75rem;
  }

  html.story-enhanced .scroll-story--opening h1 {
    font-size: clamp(2rem, 9vw, 2.35rem);
  }

  html.story-enhanced .scroll-story--opening .lead {
    font-size: .9rem;
    line-height: 1.4;
  }

  html.story-enhanced .scroll-story--opening .proof {
    padding-right: 4.2rem;
    font-size: .64rem;
  }

  html.story-enhanced .scroll-story--ending .closing-content {
    bottom: max(.55rem, env(safe-area-inset-bottom));
    padding: .75rem;
  }
}

@media (max-width: 1180px) and (max-height: 600px) and (orientation: landscape) {
  html.story-enhanced .scroll-story--opening {
    height: 360svh;
  }

  html.story-enhanced .scroll-story--ending {
    height: 300svh;
  }

  html.story-enhanced .scroll-story__stage,
  html.story-enhanced .scroll-story--ending .scroll-story__stage {
    height: 100svh;
    padding: 4.4rem 1rem .6rem;
  }

  html.story-enhanced .scroll-story--opening .scroll-story__scrim,
  html.story-enhanced .scroll-story--ending .scroll-story__scrim {
    background: none;
  }

  html.story-enhanced .scroll-story--opening :is(h1, .eyebrow, .lead, .proof, .text-link),
  html.story-enhanced .scroll-story--ending .closing-content :is(h2, p) {
    -webkit-text-stroke: 0;
    paint-order: normal;
    text-shadow: none;
  }

  html.story-enhanced .scroll-story--opening .hero-copy {
    top: 59%;
    width: min(27rem, 56vw);
  }

  html.story-enhanced .scroll-story--opening h1 {
    max-width: none;
    font-size: clamp(2rem, 5vw, 2.55rem);
    line-height: .94;
  }

  html.story-enhanced .scroll-story--opening .eyebrow {
    margin-bottom: .4rem;
    font-size: .62rem;
  }

  html.story-enhanced .scroll-story--opening .lead {
    margin-top: .5rem;
    font-size: .82rem;
    line-height: 1.36;
  }

  html.story-enhanced .scroll-story--opening .actions {
    gap: .55rem 1rem;
    margin-top: .55rem;
  }

  html.story-enhanced .scroll-story--opening .button {
    min-height: 2.4rem;
    padding: .5rem .85rem;
    font-size: .76rem;
  }

  html.story-enhanced .scroll-story--opening .text-link {
    font-size: .74rem;
  }

  html.story-enhanced .scroll-story--opening .proof {
    margin-top: .45rem;
    font-size: .64rem;
    line-height: 1.34;
  }

  html.story-enhanced .scroll-story--ending .closing-content {
    top: 54%;
    left: 1.2rem;
    align-items: flex-start;
    width: min(22rem, 46vw);
    text-align: left;
    transform: translateY(-50%);
  }

  html.story-enhanced .scroll-story--ending .closing-content h2 {
    margin-bottom: .65rem;
    font-size: clamp(2rem, 5vw, 2.45rem);
    line-height: .96;
  }

  html.story-enhanced .scroll-story--ending .closing-content p {
    margin-bottom: .75rem;
    font-size: .78rem;
    line-height: 1.35;
  }

  html.story-enhanced .scroll-story--ending .closing-content .button {
    min-height: 2.45rem;
    margin: 0 0 .55rem;
    padding: .52rem .85rem;
    font-size: .76rem;
  }

  html.story-enhanced .scroll-story--ending .closing-proof {
    font-size: .58rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-story__media video {
    display: none;
  }

  .scroll-story__poster {
    opacity: 1 !important;
  }
}
