/* ── STICKY WRAPPER ── */
.sticky-section {
  position: relative;
  counter-reset: slide-counter;
}

.sticky-container {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sticky-slide-visual .client-logo {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 0;
  left: 0;
  margin: 0 auto;
  width: auto;
  height: auto;
  object-fit: contain;
}


/* ── DESKTOP SPLIT LAYOUT ── */
@media screen and (min-width: 992px) {
  .sticky-slide {
    position: absolute;
    width: 100%;
    height: calc(100vh - var(--size--container)*2);
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    display: grid;
    grid-template-columns: 40% 1fr;
    gap: var(--size--24);
    pointer-events: none;
    border-radius: 0;
    overflow: hidden;
  }

  .sticky-slide.active {
    pointer-events: auto;
  }

  /* Text column styling */
  .sticky-slide-text {
    padding: 20% var(--size--30) var(--size--30);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    counter-increment: slide-counter;
    border-radius: 0;
  }

  .sticky-slide.active .sticky-slide-text {
    opacity: 1;
  }

  /* Static text (global fields) — no animation */
  .sticky-section--static-text .sticky-slide-text {
    opacity: 1;
    transition: none;
  }

  .sticky-section--static-text .client-name .sticky-line,
  .sticky-section--static-text .agent-title .sticky-line,
  .sticky-section--static-text .agent-desc .sticky-line {
    transform: translateY(0%);
    transition: none;
  }

  /* Image column styling */
  .sticky-slide-visual {
    position: relative;
    background: #000;
    overflow: hidden;
    clip-path: inset(100% 0 0 0 round var(--size--20));
    z-index: 1;
    border-radius: 0;
  }

  /* First visual is visible by default */
  .sticky-slide[data-index="0"] .sticky-slide-visual {
    clip-path: inset(0% 0 0 0 round var(--size--20));
    z-index: 2;
  }

  .sticky-slide-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }


  .client-name .sticky-line,
  .agent-title .sticky-line,
  .agent-desc .sticky-line {
      transform: translateY(110%);
      /* OUT state (slide losing .active): slow roll DOWN */
      transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
      transition-delay: 0s;
      will-change: transform;
  }

  .sticky-slide.active .client-name .sticky-line,
  .sticky-slide.active .agent-title .sticky-line,
  .sticky-slide.active .agent-desc .sticky-line {
      transform: translateY(0%);
      /* IN state: roll UP, but only after the down-movement finishes (1.4s) + 0.1s gap, plus per-element/per-line stagger */
      transition: transform 1.1s cubic-bezier(0.12, 1, 0.36, 1);
      transition-delay: calc(0.25s + var(--base, 0s) + var(--i) * 0.02s);
  }
  .client-name {
      display: block; /* let SplitText lines stack; was flex */
  }
}

/* ── SHARED ELEMENT STYLING ── */



.slide-index {
  margin-bottom: auto;
}

/* Client Name */
.client-name {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: var(--size--120);
}


/* Content Block */
.content-block {
  margin-bottom: auto;
}

.agent-title {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--size--10);
}

.agent-desc {
  margin-top: 8px;
  max-width: 42ch;
  margin-bottom: 24px;

  p {
    margin-bottom: 0.7em;
    &:last-child {
        margin-bottom: 0;
    }
  }
  ul {
    margin-bottom: 0.7em;
    font-size: var(--type-18);
    line-height: 1.4;
    &:last-child {
      margin-bottom: 0;
    }
  }
}



/* Scroll Arrow */
.scroll-row {
  display: flex;
  align-items: center;
  gap: var(--size--20);
  margin-top: auto;
}
.scroll-row .scroll-btn {
  cursor: auto;
}
.scroll-row.no-arrow {
  display: none;
}
a.scroll-row.has-arrow {
  .scroll-btn {
    cursor: pointer;
  }
}


#about-onoma {
  svg path {
    fill: var(--color-dark);
  }
}


/* ── MOBILE CAROUSEL (global heading/sub-heading/description) ── */
.sticky-mobile-carousel {
  display: none;
}

@media screen and (max-width: 991px) {
  /* Replace the repeated image/text stack with a single carousel + one shared text block */
  .sticky-section--static-text .sticky-container {
    display: none;
  }

  .sticky-mobile-carousel {
    display: block;
  }

  .sticky-mobile-carousel .swiper-container {
    position: relative;
    width: 100%;
    overflow: hidden;
  }

  .sticky-mobile-carousel .swiper-wrapper {
    box-sizing: border-box;
  }

  .sticky-mobile-carousel .swiper-slide {
    width: 100%;
    height: auto;
    flex-shrink: 0;
  }

  .sticky-mobile-carousel .sticky-slide-visual {
    width: 100%;
    aspect-ratio: 4 / 5;
    background: #000;
    border-radius: 0;
    overflow: hidden;
    margin-bottom: var(--size--16);
  }

  .sticky-mobile-carousel .sticky-slide-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .sticky-mobile-carousel .swiper-pagination {
    position: absolute;
    margin-top: var(--size--16);
    bottom: 20px !important;
  }

  .sticky-mobile-carousel .swiper-pagination-bullet{
    background:var(--color-5);
  }

  .sticky-mobile-carousel .sticky-slide-text {
    /* background: none;
    padding: 0; */
    padding:var(--size--20);
  }
}

/* ── MOBILE STACKING LAYOUT ── */
@media screen and (max-width: 991px) {
  /* .sticky-section {
    padding: 0;
  } */

  .sticky-container {
    position: relative;
    height: auto !important;
    overflow: visible;

    flex-flow: column;
    display: flex;
  }

  .sticky-slide {
    position: relative;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Slide divisor */
    counter-increment: slide-counter;
    grid-row-gap: var(--size--16);
    margin-bottom: var(--size--32);
    &:last-child {
      /* margin-bottom: var(--size--32); */
      margin-bottom: 0;
    }
  }

  .sticky-slide-visual {
    order: 1;
    /* Image first */
    /* height: 480px; */
    /* Stronger height for portfolio feel */
    width: 100%;
    background: #000;
    border-radius: 0;
    overflow:hidden;
  }

  .sticky-slide-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .sticky-slide-text {
    order: 2;
    /* Text second */
    padding: var(--size--20);
    height: auto;
    opacity: 1 !important;
    border-radius: 0;
    overflow:hidden;
  }

  .scroll-row {
    display: none;
    /* Only relevant for scroll-driven reveals */
  }

  .agent-desc {
    max-width: 100%;
  }

  .client-name {
    margin-bottom: var(--size--40);
  }
}

@media screen and (max-width: 767px) {
  .sticky-slide-visual .client-logo {
    width: 100%;
    max-width: 6.8rem;
    height: 100%;
    max-height: 3.875rem;
  }

}


@media screen and (max-width: 479px) {
  .sticky-slide {
    grid-row-gap: var(--size--4);
    margin-bottom: var(--size--20);
  }
  .sticky-slide-visual,
  .sticky-slide-text {
    border-radius: 0;
  }
  .agent-desc {
    margin-bottom: 0;
    font-size: .9375rem;
    line-height: 1.3;
  }
}