/* ==========================================================================
   ROKMOB SCROLL STORY — webndo

   Desktop: pinned chapter. The image frame narrows, the original green
   logo stays on that frame and travels straight up, features and images
   rise together, then Sortiment enters from the right as a four-card row.
   Below 1200px and for reduced motion the same DOM is normal page flow.
   ========================================================================== */

.rokmob-story {
  --split: 0;
  --copy: 1;
  --lift: 0;
  --handoff: 0;
  --reel: 0;
  --stage-w: 100%;
  --rokmob-logo-inset-x: clamp(36px, 6vw, 96px);
  --logo-y: 0px;
  --logo-s: 1;
  position: relative;
  background: #F7F9FB;
}

.rokmob-story__sticky,
.rokmob-story__stage {
  position: relative;
}

.rokmob-story__track {
  display: block;
}

.rokmob-story__panel--story {
  display: flex;
  flex-direction: column;
  background: #F7F9FB;
}

.rokmob-story__visual {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #E4E8EC;
}

.rokmob-story__reel {
  position: absolute;
  inset: 0;
}

.rokmob-story__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rokmob-story__frame:not(:first-child) {
  display: none;
}

.rokmob-story__frame[data-frame="0"] { object-position: 50% 62%; }
.rokmob-story__frame[data-frame="1"] { object-position: 50% 72%; }
.rokmob-story__frame[data-frame="2"] { object-position: center bottom; }
.rokmob-story__frame[data-frame="3"] { object-position: 72% 58%; }
.rokmob-story__frame[data-frame="4"] { object-position: 50% 64%; }
.rokmob-story__frame[data-frame="5"] { object-position: 48% 62%; }

.rokmob-story__logo {
  display: block;
  width: min(320px, 78vw);
  height: auto;
  margin: 28px var(--gutter) 0;
}

.rokmob-story__copy {
  padding: 28px var(--gutter) 64px;
}

.rokmob-story__lead .h2 {
  margin-bottom: 16px;
}

.rokmob-story .feature__text {
  max-width: 36em;
  margin-bottom: 8px;
}

.rokmob-story .benefit-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 520px;
  margin: 28px 0 8px;
}

.rokmob-story .benefit-list__item {
  position: relative;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 0;
  border: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 1.45vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text-dark);
}

.rokmob-story .benefit-list__row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.rokmob-story__link {
  display: none;
}

.rokmob-story .benefit-list__item + .benefit-list__item {
  border-left: 0;
}

.rokmob-story .benefit-list__item .icon {
  width: 36px;
  height: 36px;
  stroke-width: 1.5;
}

.rokmob-story__statement {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: clamp(240px, 52vw, 420px);
  margin: 28px var(--gutter) 56px;
  padding: 32px clamp(20px, 4vw, 40px);
  overflow: hidden;
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-align: right;
  color: #fff;
}

.rokmob-story__statement-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 48% 62%;
}

.rokmob-story__statement span {
  position: relative;
  z-index: 1;
  max-width: 12em;
  padding: 22px 28px;
  background: var(--nashorn-blue);
  color: #fff;
  box-shadow: none;
}

/* Sortiment tiles — shared by the pinned mosaic and the smaller breakpoints. */
.rokmob-story .category-card {
  position: relative;
  display: block;
  min-height: 280px;
  height: 100%;
  overflow: hidden;
  background: #0C1A29;
  box-shadow: none;
  color: #fff;
  transform: none;
}

.rokmob-story .category-card__media {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  height: 100%;
}

.rokmob-story .category-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rokmob-story .category-card__body {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 56px 22px 22px;
  background: linear-gradient(to top, rgba(12, 26, 41, 0.78) 0%, rgba(12, 26, 41, 0.28) 58%, rgba(12, 26, 41, 0) 100%);
}

.rokmob-story .category-card__title {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.3125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
  transition: font-size 720ms cubic-bezier(0.22, 1, 0.36, 1);
}

.rokmob-story .category-card__text {
  max-width: 22em;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.875rem;
  line-height: 1.45;
  opacity: 0;
  max-height: 0;
  transform: translateY(8px);
  transition:
    opacity 420ms var(--ease-out),
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1),
    max-height 520ms cubic-bezier(0.22, 1, 0.36, 1),
    margin-top 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.rokmob-story .product-card__arrow {
  top: 0;
  right: 0;
  width: 48px;
  height: 48px;
  place-items: center;
  background: var(--nashorn-blue);
  color: #fff;
  transition: filter 280ms var(--ease-out);
}

.rokmob-story .product-card__arrow .icon {
  width: 22px;
  height: 22px;
  stroke-width: 2.25;
}

.rokmob-story .category-card:hover,
.rokmob-story .category-card:focus-visible {
  transform: none;
  box-shadow: none;
}

.rokmob-story .category-card:hover .product-card__arrow,
.rokmob-story .category-card:focus-visible .product-card__arrow {
  filter: brightness(1.14);
}

.rokmob-story .category-card:hover .product-card__arrow .icon,
.rokmob-story .category-card:focus-visible .product-card__arrow .icon {
  transform: translate(3px, -3px);
}

.rokmob-story .rokmob-sortiment__mosaic > li.is-active .category-card__text,
.rokmob-story .category-card:focus-within .category-card__text {
  max-height: 5.5em;
  margin-top: 8px;
  opacity: 1;
  transform: translateY(0);
  transition-delay: 80ms;
}

@media (max-width: 767.98px),
       (min-width: 768px) and (max-width: 1023.98px) and (orientation: portrait),
       (min-width: 768px) and (max-width: 1199.98px) and (orientation: landscape) and (max-height: 600px) {
  .rokmob-story .category-card:hover .category-card__text {
    max-height: 5.5em;
    margin-top: 8px;
    opacity: 1;
    transform: translateY(0);
  }
}

.rokmob-sortiment {
  width: min(var(--container-wide), 100% - 2 * min(var(--gutter), 40px));
  margin-inline: auto;
}

.rokmob-sortiment__intro {
  padding: 48px 0 28px;
}

.rokmob-sortiment__intro .h2 {
  max-width: 12em;
}

@media (min-width: 768px) {
  .rokmob-sortiment__mosaic {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 16px;
    margin: 0;
    padding: 0;
    overflow: visible;
    scroll-snap-type: none;
  }

  .rokmob-sortiment__mosaic > li {
    min-width: 0;
    min-height: 320px;
  }

  .rokmob-story .category-card {
    min-height: 320px;
  }
}

@media (min-width: 1200px) and (prefers-reduced-motion: no-preference),
       (min-width: 768px) and (max-width: 1199.98px) and (orientation: landscape) and (min-height: 601px) and (prefers-reduced-motion: no-preference),
       (min-width: 1024px) and (max-width: 1199.98px) and (orientation: portrait) and (prefers-reduced-motion: no-preference) {
  .rokmob-story.is-cinematic {
    height: 500vh;
    scroll-margin-top: calc(var(--header-h-compact) * -1);
  }

  .rokmob-story.is-cinematic .rokmob-story__sticky {
    position: sticky;
    top: 0;
    height: 100dvh;
    overflow: clip;
  }

  .rokmob-story.is-cinematic .rokmob-story__stage {
    height: 100%;
    overflow: clip;
  }

  .rokmob-story.is-cinematic .rokmob-story__track {
    display: flex;
    height: 100%;
    width: calc(var(--stage-w) * 2);
    transform: translate3d(calc(var(--handoff) * var(--stage-w) * -1), 0, 0);
  }

  .rokmob-story.is-cinematic .rokmob-story__panel {
    flex: 0 0 var(--stage-w);
    width: var(--stage-w);
    height: 100%;
    overflow: hidden;
  }

  .rokmob-story.is-cinematic .rokmob-story__panel--story {
    display: block;
    position: relative;
  }

  .rokmob-story.is-cinematic .rokmob-story__visual {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    aspect-ratio: auto;
    width: calc(100% - 40% * var(--split));
    overflow: hidden;
  }

  .rokmob-story.is-cinematic .rokmob-story__reel {
    height: 100%;
    transform: translate3d(0, calc(var(--reel) * -100%), 0);
  }

  .rokmob-story.is-cinematic .rokmob-story__frame {
    display: block;
    inset: auto 0 auto 0;
    top: calc(var(--i) * 100%);
    height: 100%;
  }

  /* Left inset is constant. Only vertical position and scale change. */
  .rokmob-story.is-cinematic .rokmob-story__logo {
    position: absolute;
    z-index: 4;
    top: 0;
    left: var(--rokmob-logo-inset-x);
    width: 285px;
    max-width: none;
    margin: 0;
    pointer-events: none;
    transform: translate3d(0, var(--logo-y), 0) scale(var(--logo-s));
    transform-origin: 0 0;
  }

  .rokmob-story.is-cinematic .rokmob-story__copy {
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    max-width: none;
    padding: 0;
    pointer-events: none;
  }

  .rokmob-story.is-cinematic.is-copy-ready .rokmob-story__copy {
    pointer-events: auto;
  }

  .rokmob-story.is-cinematic .rokmob-story__lead {
    position: absolute;
    left: clamp(28px, 2.4vw, 48px);
    right: clamp(32px, 3vw, 60px);
    top: 50%;
    opacity: var(--copy);
    transform: translate3d(0, calc(-50% - var(--lift) * 16vh), 0);
  }

  .rokmob-story.is-cinematic .rokmob-story__lead .h2 {
    margin-bottom: 14px;
  }

  .rokmob-story.is-cinematic .feature__text {
    max-width: 32em;
    margin-bottom: 0;
  }

  .rokmob-story.is-cinematic .benefit-list {
    position: absolute;
    left: clamp(28px, 2.4vw, 48px);
    right: clamp(32px, 3vw, 60px);
    top: calc(50% + 7vh);
    gap: 0;
    margin: 0;
    max-width: none;
  }

  .rokmob-story.is-cinematic .benefit-list__item {
    margin-top: calc(var(--in, 0) * 18px);
    overflow: visible;
    opacity: calc(var(--in, 0) * (0.78 + 0.22 * var(--hot, 0)));
    transform: translate3d(0, calc((1 - var(--in, 0)) * 32px), 0);
  }

  .rokmob-story.is-cinematic .benefit-list__row {
    max-height: calc(var(--in, 0) * 4.2rem);
    overflow: hidden;
  }

  .rokmob-story.is-cinematic .rokmob-story__link {
    display: block;
    position: absolute;
    z-index: 3;
    top: 50%;
    right: calc(100% + 8px);
    width: calc(clamp(28px, 2.4vw, 48px) + 8px + 12vw);
    height: 2px;
    background: var(--nashorn-blue);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 450ms cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
  }

  .rokmob-story.is-cinematic .benefit-list__item.is-linked .rokmob-story__link {
    transform: scaleX(1);
  }

  .rokmob-story.is-cinematic .rokmob-story__statement {
    position: absolute;
    z-index: 3;
    top: 0;
    left: 0;
    width: calc(100% - 40% * var(--split));
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0 clamp(28px, 3.2vw, 56px) 0 18%;
    justify-content: flex-end;
    font-size: clamp(1.65rem, 2.05vw, 2.15rem);
    line-height: 1.12;
    pointer-events: none;
    opacity: var(--in, 0);
    transform: translate3d(0, calc((1 - var(--in, 0)) * 28px), 0);
  }

  .rokmob-story.is-cinematic .rokmob-story__statement-photo {
    display: none;
  }

  .rokmob-story.is-cinematic .rokmob-story__statement span {
    max-width: 13.6em;
    padding: 26px 32px;
  }

  .rokmob-story.is-cinematic .rokmob-story__panel--sortiment {
    padding: 0;
    background: #F7F9FB;
  }

  .rokmob-story.is-cinematic .rokmob-sortiment {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    min-height: 0;
    padding-top: max(calc(var(--header-h-compact) + 28px), calc(34vh - 6.5rem));
    padding-bottom: clamp(28px, 4vh, 48px);
    box-sizing: border-box;
  }

  .rokmob-story.is-cinematic .rokmob-sortiment__intro {
    padding: 0 0 clamp(22px, 3vh, 36px);
  }

  .rokmob-story.is-cinematic .rokmob-sortiment__intro .h2 {
    max-width: 16em;
  }

  .rokmob-story.is-cinematic .rokmob-sortiment__mosaic {
    display: flex;
    align-items: stretch;
    gap: 16px;
    height: clamp(340px, 48vh, 520px);
    flex: 0 0 auto;
  }

  .rokmob-story.is-cinematic .rokmob-sortiment__mosaic > li {
    flex: 1 1 0%;
    min-width: 0;
    min-height: 0;
    height: 100%;
    transition: flex-grow 720ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .rokmob-story.is-cinematic .rokmob-sortiment__mosaic.is-engaged > li {
    flex-grow: 18;
  }

  .rokmob-story.is-cinematic .rokmob-sortiment__mosaic.is-engaged > li.is-active {
    flex-grow: 46;
  }

  .rokmob-story.is-cinematic .rokmob-sortiment__mosaic.is-engaged > li:not(.is-active) .category-card__title {
    font-size: 1rem;
  }

  .rokmob-story.is-cinematic .rokmob-sortiment__mosaic > li.is-active .category-card__media img {
    transform: scale(1.02);
  }

  .rokmob-story.is-cinematic .category-card {
    min-height: 0;
    height: 100%;
  }

  .rokmob-story.is-cinematic .category-card__media img {
    transition: transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rokmob-story,
  .rokmob-story__sticky {
    height: auto;
  }

  .rokmob-story__sticky {
    position: static;
  }

  .rokmob-story .category-card__text {
    max-height: none;
    margin-top: 8px;
    opacity: 1;
    transform: none;
  }
}
