/* Featured Case Studies — React Bits <FlowingMenu /> adapted to the static stack.
   Dark panel with two menu rows; on hover a white marquee overlay slides in
   from the nearest edge and scrolls the item text + image pills seamlessly.
   Degrades to static rows when JS/GSAP is unavailable. */

/* === Section & header (dark) === */
.case-studies {
  background: var(--ink);
  color: var(--paper);
  padding: 70px 0;
  border-top: 1px solid #222;
}

.case-studies .kicker {
  color: var(--accent);
}

.case-studies h2 {
  color: var(--paper);
  font-size: clamp(28px, 5vw, 58px);
}

.case-studies-desc {
  max-width: 560px;
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.65;
  color: #c9c8c4;
}

/* === Menu panel === */
.menu-wrap {
  width: 100%;
  height: clamp(320px, 46vh, 560px);
  overflow: hidden;
  margin-top: 44px;
}

.menu {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  padding: 0;
}

/* === Menu rows === */
.menu__item {
  flex: 1;
  position: relative;
  overflow: hidden;
  text-align: center;
  border-top: 1px solid #222;
}

.menu__item:first-child {
  border-top: none;
}

.menu__item-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  position: relative;
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  font-size: clamp(24px, 4.4vw, 44px);
  color: var(--paper);
}

.menu__item-link:hover {
  color: inherit;
}

.menu__item-link:focus:not(:focus-visible) {
  color: inherit;
}

.menu__item-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* === Marquee overlay === */
.marquee {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  overflow: hidden;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: var(--paper);
  transform: translate3d(0, 101%, 0);
}

.marquee__inner-wrap {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.marquee__inner {
  display: flex;
  align-items: center;
  position: relative;
  height: 100%;
  width: fit-content;
  will-change: transform;
}

.marquee__part {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.marquee span {
  white-space: nowrap;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  font-size: clamp(24px, 4.4vw, 44px);
  line-height: 1;
  padding: 0 1vw;
  color: var(--ink);
}

.marquee__img {
  width: clamp(120px, 18vw, 220px);
  height: clamp(60px, 7vh, 110px);
  margin: 0 2vw;
  border-radius: 50px;
  overflow: hidden;
  background: #EFEDE6;
}

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

/* === Responsive === */
@media (max-width: 900px) {
  .case-studies {
    padding: 48px 0;
  }

  .menu-wrap {
    height: clamp(280px, 50vh, 420px);
    margin-top: 36px;
  }
}

@media (hover: none), (pointer: coarse) {
  .marquee {
    display: none;
  }
}
