/* Hero cats cascade — fixed outer frame; only each row’s fill grows */

.hero--cats {
  min-height: 100svh;
  /* clip breaks ScrollTrigger pin-spacer → next scenes stack on the hero */
  overflow: visible;
  background: var(--ink);
}

/* Desktop: keep main-page copy placement; only size the cats column */
@media (min-width: 901px) {
  /* Cap to copy (42rem) + gap + cats (20rem) so the pair stays centered
     on wide screens instead of drifting left with dead space at right */
  .hero--cats .hero__inner {
    max-width: 68rem;
  }

  .hero--cats .hero__visual {
    justify-self: end;
    width: min(100%, 20rem);
  }
}

/* Outer shell: left + top only. Right edge lives on each row. */
.hero--cats .hero__visual {
  overflow: visible;
  border-right: none;
  border-bottom: none;
  border-radius: 0;
  background: transparent;
}

.hero--cats .hero__visual-head {
  border-right: 1px solid var(--line);
  border-top-right-radius: 0;
  background: color-mix(in srgb, var(--ink-soft) 80%, transparent);
}

.hero--cats .hero__cats {
  display: flex;
  flex-direction: column;
  grid-template-rows: none;
  gap: 0;
  min-height: 0;
  height: 100%;
  overflow: visible;
}

/*
  Fixed layout width; visual growth via scaleX (GPU) — smoother than width scrub.
*/
.hero--cats .hero-cat {
  --w: 1;
  --glow: 0;
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  align-self: stretch;
  box-sizing: border-box;
  overflow: visible;
  background: transparent;
  border-bottom: none;
  z-index: calc(1 + var(--glow) * 5);
}

.hero--cats .hero-cat:last-child {
  border-bottom: none;
}

.hero--cats .hero-cat::before {
  content: "";
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  transform: scaleX(var(--w));
  transform-origin: left center;
  background:
    linear-gradient(
      color-mix(in srgb, var(--cat) calc(var(--glow) * 16%), transparent),
      color-mix(in srgb, var(--cat) calc(var(--glow) * 16%), transparent)
    ),
    color-mix(in srgb, var(--ink-soft) 80%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--line) 88%, var(--cat));
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.hero--cats .hero-cat:last-child::before {
  border-bottom-right-radius: 0;
}

.hero--cats .hero-cat::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  transform: scaleX(var(--w));
  transform-origin: left center;
  background: color-mix(in srgb, var(--line) 88%, var(--cat));
  pointer-events: none;
  z-index: 2;
  will-change: transform;
}

.hero--cats .hero-cat__art,
.hero--cats .hero-cat__meta {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero--cats .hero-cat__art {
  opacity: calc(0.55 + var(--glow) * 0.45);
}
.hero--cats .hero-cat__art svg {
  max-height: 2.35rem;
}

.hero--cats .hero-cat__num {
  font-weight: calc(500 + var(--glow) * 200);
}

.hero--cats .hero-cat__title {
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

/* Prevent full-width hover slab (would break the right-aligned grey) */
.hero--cats .hero-cat:hover,
.hero--cats .hero-cat:focus-visible {
  background: transparent;
}

@media (max-width: 900px) {
  .hero--cats {
    overflow-x: clip;
  }

  /* Stack like main hero: copy first, cats below */
  .hero--cats .hero__inner {
    grid-template-columns: 1fr;
  }

  .hero--cats .hero__copy {
    justify-self: stretch;
    width: auto;
    max-width: none;
    padding-left: 0;
  }

  /*
    Same place as before (under hero), not centered:
    5% from the left so peak growth has room on the right.
  */
  .hero--cats .hero__visual {
    --mobile-max: 85%;
    --mobile-base: calc(var(--mobile-max) / 1.2);
    order: 2;
    width: var(--mobile-base);
    max-width: var(--mobile-base);
    min-height: clamp(20rem, 70vw, 28rem);
    margin-left: 5%;
    margin-right: auto;
    justify-self: start;
    overflow: visible;
  }

  .hero--cats .hero__visual-head {
    width: 100%;
  }

  /* GPU path already global; keep mobile sizing only */
  .hero--cats .hero-cat {
    width: 100%;
    align-self: stretch;
  }

  .hero--cats .hero-cat__title {
    font-size: 0.95rem;
  }

  .hero--cats .hero-cat__num {
    font-size: 0.72rem;
  }
}
