/* ── Overlay ──────────────────────────────────────────────────────────── */

.scroll-story {
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: #020509;
  overflow-y: scroll;
  display: none;
}

.scroll-story.is-active {
  display: block;
}

/* ── Sticky header (close button stays visible while scrolling) ────────── */

.scroll-story__header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  padding: 1.1rem 1.25rem;
  pointer-events: none;
  /* sits above the two-column layout via negative margin */
  margin-bottom: -3.5rem;
}

.scroll-story__close {
  pointer-events: all;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.scroll-story__close:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

/* ── Two-column wrapper ────────────────────────────────────────────────── */

.scroll-story__wrapper {
  display: flex;
  align-items: flex-start;
}

/* ── LEFT: sticky image pane ──────────────────────────────────────────── */

.scroll-story__img-pane {
  position: sticky;
  top: 0;
  width: 50%;
  height: 100vh;
  flex-shrink: 0;
  overflow: hidden;
}

.scroll-story__imgs {
  position: relative;
  width: 100%;
  height: 100%;
}

.scroll-story__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3rem 2.5rem;
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hero/photo slide: fill the pane edge-to-edge */
.scroll-story__img--cover {
  object-fit: cover;
  padding: 0;
}

.scroll-story__img.is-active {
  opacity: 1;
}

/* Subtle dark vignette so text-pane border doesn't look harsh */
.scroll-story__img-pane::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 85%, #020509 100%);
  pointer-events: none;
}

/* ── RIGHT: scrolling text pane ───────────────────────────────────────── */

.scroll-story__text-pane {
  width: 50%;
  flex-shrink: 0;
}

.scroll-story__section {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 4rem 4rem 3.5rem;
  border-left: 1px solid #1a2030;
}

/* ── Text elements ────────────────────────────────────────────────────── */

.scroll-story__eyebrow,
.scroll-story__headline,
.scroll-story__body {
  opacity: 0;
  transform: translateY(28px);
}

.scroll-story__section.is-visible .scroll-story__eyebrow {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.65s 0.1s ease,
    transform 0.65s 0.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-story__section.is-visible .scroll-story__headline {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.65s 0.26s ease,
    transform 0.65s 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-story__section.is-visible .scroll-story__body {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.65s 0.42s ease,
    transform 0.65s 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-story__eyebrow {
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  margin-bottom: 0.75rem;
}

.scroll-story__headline {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #f0f4f8;
  margin-bottom: 1.1rem;
}

.scroll-story__body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.52);
  line-height: 1.75;
  max-width: 38ch;
}

/* ── Scroll hint on first section ─────────────────────────────────────── */

.scroll-story__hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.2);
  opacity: 0;
  transform: translateY(28px);
}

.scroll-story__section.is-visible .scroll-story__hint {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.65s 0.6s ease,
    transform 0.65s 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-story__hint-arrow {
  display: inline-block;
  animation: bounceDown 1.6s ease-in-out infinite;
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}

/* ── Slide counter (top-left of image pane) ───────────────────────────── */

.scroll-story__counter {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.22);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.3s;
}

/* ── Mobile: stack vertically ─────────────────────────────────────────── */

@media (max-width: 768px) {
  .scroll-story__wrapper {
    flex-direction: column;
  }

  .scroll-story__img-pane {
    position: relative;
    width: 100%;
    height: 50vh;
    top: auto;
  }

  .scroll-story__img-pane::after {
    background: linear-gradient(to bottom, transparent 75%, #020509 100%);
  }

  .scroll-story__text-pane {
    width: 100%;
  }

  .scroll-story__section {
    height: auto;
    min-height: 60vh;
    padding: 2.5rem 1.75rem;
    border-left: none;
    border-top: 1px solid #1a2030;
  }

  .scroll-story__header {
    margin-bottom: 0;
  }
}
