/* ===== Light, restrained motion system ===== */

@media (prefers-reduced-motion: no-preference) {
  .shelf-book {
    animation: settle 0.7s cubic-bezier(.22,1,.36,1) backwards;
  }
  @keyframes settle {
    from { opacity: 0; transform: translateY(24px) rotate(0deg); }
  }

  .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .shelf-book, .reveal { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* Book spine hover — gently "pulls out" like taking it off a shelf */
.spine {
  transform-origin: bottom center;
}
.spine:hover {
  transform: translateY(-18px) rotate(-2deg);
}

/* Product card hover */
.book-card > div:first-child {
  transition: transform 0.35s cubic-bezier(.22,1,.36,1), box-shadow 0.35s ease;
}
.book-card:hover > div:first-child {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 0 18px 30px -12px rgba(46, 26, 15, 0.35);
}

/* Shelf horizontal scroll — hide scrollbar but keep it usable */
.spine-shelf {
  scrollbar-width: thin;
  scrollbar-color: #5B233355 transparent;
}
.spine-shelf::-webkit-scrollbar { height: 6px; }
.spine-shelf::-webkit-scrollbar-thumb { background: #5B233355; border-radius: 999px; }

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid #E8A33D;
  outline-offset: 2px;
}
