/* A biblioteca de front da área, na página de vendas: o texto à esquerda e, à direita, a grade de
   componentes rolando devagar numa janela de navegador, com um cartão virado (o código) por cima.
   O movimento é só transform (compositor) e para com o mouse em cima ou com movimento reduzido. */
.library {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.library__where {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--nevoa);
  font-size: var(--text-sm);
  font-weight: 600;
}

.library__where::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brasa);
}

.library__lead {
  margin-top: 1.25rem;
  color: var(--nevoa);
  font-size: var(--text-lg);
  line-height: 1.5;
}

.library__points {
  display: grid;
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.library__points li {
  display: grid;
  gap: 0.15rem;
  padding-left: 1.1rem;
  border-left: 2px solid var(--aco-claro);
}

.library__points b {
  font-weight: 650;
}

.library__points span {
  color: var(--nevoa);
  font-size: var(--text-sm);
}

/* A vitrine: a janela e o cartão virado, que flutua sobre o canto */
.library__show {
  position: relative;
  padding: 0 0 2.5rem 2.5rem;
}

.library__screen {
  margin: 0;
  overflow: hidden;
  border-radius: var(--r-feature);
  background: #0b0c0e;
  box-shadow: var(--depth-card), 0 40px 90px -40px rgb(255 91 31 / 0.35);
}

.library__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-bottom: 1px solid rgb(255 255 255 / 0.07);
  color: #8b8e96;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.library__bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2c2f36;
}

.library__bar span {
  overflow: hidden;
  margin-left: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library__view {
  position: relative;
  height: clamp(380px, 44vw, 560px);
  overflow: hidden;
}

/* O pé da janela escurece: a grade parece continuar */
.library__view::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 30%;
  background: linear-gradient(to top, #0b0c0e, transparent);
  pointer-events: none;
}

.library__view img {
  display: block;
  width: 100%;
  height: auto;
  animation: library-rolar 48s ease-in-out infinite alternate;
}

.library__show:hover .library__view img {
  animation-play-state: paused;
}

@keyframes library-rolar {
  0%,
  6% {
    transform: translateY(0);
  }

  94%,
  100% {
    transform: translateY(calc(-100% + clamp(380px, 44vw, 560px)));
  }
}

.library__card {
  position: absolute;
  bottom: 0;
  left: 0;
  width: clamp(170px, 34%, 250px);
  margin: 0;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), 0 30px 60px -20px rgb(0 0 0 / 0.75);
  transform: rotate(-4deg);
  animation: library-flutuar 7s ease-in-out infinite;
}

.library__card img {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes library-flutuar {
  50% {
    transform: rotate(-2.5deg) translateY(-10px);
  }
}

@media (max-width: 960px) {
  .library {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .library__show {
    padding: 0 0 1.75rem 1.25rem;
  }

  .library__view {
    height: 360px;
  }

  @keyframes library-rolar {
    0%,
    6% {
      transform: translateY(0);
    }

    94%,
    100% {
      transform: translateY(calc(-100% + 360px));
    }
  }

  .library__card {
    width: 42%;
  }

  .library__lead {
    font-size: var(--text-base);
  }
}

@media (prefers-reduced-motion: reduce) {
  .library__view img,
  .library__card {
    animation: none;
  }
}
