/* Catálogo: scroll scene with three hands holding shirts (js/pages/catalogo-escena.js). */

/* Logo left, menu centered, cart bag right (js/components/cart-app.js adds it to the third column). */
.topbar.is-fixed {
  position: fixed;
  z-index: 30;
  top: 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(18px, 2vw, 32px);
}

.topbar.is-light .brand {
  color: #171717;
  white-space: nowrap;
}

.topbar.is-light .brand-mark {
  background: #171717;
  color: #fff;
}

.topbar.is-light nav {
  background: #ffffffeb;
  border-color: #e8e8e8;
  backdrop-filter: blur(12px);
}

.topbar.is-light nav a {
  color: #171717;
}

.topbar.is-light nav a:hover {
  color: #171717;
  background: #eee;
}

.topbar.is-light nav a[aria-current=page] {
  color: #fff;
  background: #171717;
}

.topbar.is-light .menu {
  color: #171717;
  background: #f0f0f0;
}

.collection-scroll {
  position: relative;
  height: 270svh;
  background: #fff;
}

.collection-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: clip;
  background: #fff;
}

.collection-art {
  position: relative;
  width: 100%;
  height: 100%;
  --rear-width: min(108svh, 81vw);
  --front-width: min(128svh, 112vw);
}

/* Los antebrazos continúan fuera de la pantalla; no se difuminan sus extremos. */
.collection-layer {
  position: absolute;
  width: var(--rear-width);
  margin: 0;
  top: max(108px, 16svh);
  pointer-events: none;
}

.collection-layer img {
  display: block;
  width: 100%;
  height: auto;
  filter: url(#studio-cutout);
  will-change: transform;
  backface-visibility: hidden;
}

.layer-black {
  left: calc(68.5% - var(--rear-width) * .315);
  z-index: 1;
}

.layer-white {
  left: calc(31.5% - var(--rear-width) * .658);
  z-index: 2;
}

.layer-gray {
  top: max(180px, 29svh);
  left: calc(50% - var(--front-width) * .235);
  width: var(--front-width);
  z-index: 3;
}

.collection-shadow {
  position: absolute;
  top: 92%;
  left: 24%;
  width: 52%;
  height: 4%;
  border-radius: 50%;
  background: radial-gradient(closest-side, #00000012, transparent);
  filter: blur(12px);
}

.collection-scroll + .page {
  padding-top: 120px;
}

/* Primer plano: las prendas pasan detrás de las plantas durante todo el scroll. */
.collection-foliage {
  position: absolute;
  inset-block: 0;
  left: 0;
  width: 22vw;
  z-index: 8;
  overflow: hidden;
  background: transparent;
  pointer-events: none;
}

.collection-foliage img {
  position: absolute;
  top: 0;
  right: -25%;
  width: 155%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.foliage-left {
  transform: translateX(-25%);
}

.foliage-right {
  left: auto;
  right: 0;
  transform: translateX(25%) scaleX(-1);
}

@media (max-width: 700px) {
  .topbar.is-fixed {
    display: flex;
    min-height: 40px;
    justify-content: space-between;
  }

  /* Leave room for the menu button, which sits absolutely at the right edge. */
  .topbar.is-fixed .cart-icon-slot {
    margin-right: 48px;
  }

  .topbar.is-fixed .menu {
    position: absolute;
    top: 0;
    right: 0;
  }

  .topbar.is-fixed nav {
    justify-content: center;
  }

  .collection-foliage {
    width: 16vw;
  }

  .topbar.is-light nav {
    background: #fffffff5;
  }

  .collection-scroll {
    height: 240svh;
  }

  .collection-art {
    --rear-width: min(140vw, 65svh);
    --front-width: min(185vw, 92svh);
  }

  .collection-layer {
    top: max(100px, 18svh);
  }

  .layer-white {
    left: calc(30% - var(--rear-width) * .658);
  }

  .layer-black {
    top: max(120px, 21svh);
    left: calc(73% - var(--rear-width) * .315);
  }

  .layer-gray {
    top: 44svh;
    left: calc(50% - var(--front-width) * .235);
  }

  .collection-scroll + .page {
    padding-top: 96px;
  }
}

@media (min-width: 701px) and (min-aspect-ratio: 2/1) {
  .collection-art {
    --rear-width: 108svh;
    --front-width: max(112svh, 54vw);
  }
  .layer-white { left: calc(25% - var(--rear-width) * .658); }
  .layer-black { left: calc(75% - var(--rear-width) * .315); }
  .layer-gray { left: calc(60% - var(--front-width) * .235); top: 24svh; }
}

@media (prefers-reduced-motion: reduce) {
  .collection-scroll {
    height: 100svh;
  }

  .collection-layer img {
    will-change: auto;
  }
}
