/* Atmosphere & literary objects — the brand's background language.
   No stock photography: two very blurred brand-coloured halos drifting
   slowly (slate blue + copper), a whisper of paper grain, and an optional
   hand-drawn copper damask for gallery/museum surfaces. */
.atmosphere { z-index: 0; }
.atmosphere-glow {
  position: absolute; border-radius: 9999px; filter: blur(90px);
  opacity: var(--atmosphere-glow-opacity);
  animation: atmosphere-drift 26s ease-in-out infinite alternate;
  will-change: transform;
}
.atmosphere-glow-primary {
  top: -12%; left: -8%; width: 34rem; height: 34rem;
  background: radial-gradient(circle, var(--color-atmosphere-cool) 0%, transparent 70%);
}
.atmosphere-glow-warm {
  bottom: -18%; right: -6%; width: 30rem; height: 30rem;
  background: radial-gradient(circle, var(--color-atmosphere-warm) 0%, transparent 70%);
  animation-delay: -13s;
}
@keyframes atmosphere-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(28px, -20px) scale(1.08); }
}
.atmosphere-grain {
  position: absolute; inset: 0; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.atmosphere-damask {
  position: absolute; inset: 0; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cg fill='none' stroke='%23B8734F' stroke-width='1'%3E%3Cpath d='M10 110 C 55 65, 65 55, 110 10 C 155 55, 165 65, 210 110 C 165 155, 155 165, 110 210 C 65 165, 55 155, 10 110 Z'/%3E%3Ccircle cx='110' cy='110' r='16'/%3E%3Cpath d='M110 66 C 128 84, 136 92, 154 110 C 136 128, 128 136, 110 154 C 92 136, 84 128, 66 110 C 84 92, 92 84, 110 66 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 220px 220px;
}
@media (prefers-reduced-motion: reduce) { .atmosphere-glow { animation: none; } }

/* Book covers — real physical depth, never a flat rectangle. */
.book-cover {
  position: relative;
  box-shadow: var(--shadow-book);
  transition: transform 0.35s var(--ease-editorial), box-shadow 0.35s var(--ease-editorial);
}
.group:hover .book-cover, .book-cover:hover { box-shadow: var(--shadow-book-hover); }
.book-cover-spine {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to right, rgba(0,0,0,.22) 0%, transparent 5%, transparent 96%, rgba(255,255,255,.08) 100%);
}

/* Gift badge — soft-3D claymorphism, squircle. A physical object, not an icon. */
.gift-icon {
  border-radius: var(--radius-squircle);
  box-shadow: inset -3px -3px 6px rgba(0,0,0,.18), inset 3px 3px 6px rgba(255,255,255,.3), 0 10px 20px -8px rgba(0,0,0,.35);
  transition: transform 0.3s var(--ease-editorial);
}
@media (prefers-reduced-motion: reduce) { .gift-icon { transition: none; } }

/* Horizontal rails hide the native scrollbar; drag/swipe/arrows navigate. */
.scrollbar-hide { scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* Vertical comment ticker — list rendered twice, travels exactly -50%. */
.comments-marquee-track { animation: comments-scroll var(--comments-marquee-duration, 40s) linear infinite; }
.comments-marquee:hover .comments-marquee-track { animation-play-state: paused; }
@keyframes comments-scroll { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .comments-marquee-track { animation: none; }
  .comments-marquee { overflow-y: auto; }
}
