/* ============================================================
   りゃーのマンガ感想 — Editorial Enhancements
   Subtle interactions: progress bar, active TOC, fade-in
   ============================================================ */

/* --- Reading Progress Bar (review pages) --- */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-accent), var(--color-gold));
  z-index: 200;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(232,0,61,.55);
  transition: width 0.08s ease-out;
}

/* --- Card stagger animation --- */
.reviews-grid .review-card,
.related-grid .related-card {
  opacity: 0;
  transform: translateY(16px);
  animation: cardReveal 0.7s cubic-bezier(.4,0,.2,1) forwards;
}
.reviews-grid .review-card:nth-child(1) { animation-delay: 0.05s; }
.reviews-grid .review-card:nth-child(2) { animation-delay: 0.15s; }
.reviews-grid .review-card:nth-child(3) { animation-delay: 0.25s; }
.reviews-grid .review-card:nth-child(4) { animation-delay: 0.35s; }
.related-grid .related-card:nth-child(1) { animation-delay: 0.1s; }
.related-grid .related-card:nth-child(2) { animation-delay: 0.2s; }
.related-grid .related-card:nth-child(3) { animation-delay: 0.3s; }
@keyframes cardReveal {
  to { opacity: 1; transform: translateY(0); }
}

/* --- Body section reveal --- */
.body-section {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.body-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Hero subtle drift --- */
.hero-bg-lines {
  animation: bgDrift 30s linear infinite;
}
@keyframes bgDrift {
  from { background-position: 0 0; }
  to   { background-position: 0 40px; }
}

/* --- Logo dot pulse --- */
.site-logo em {
  position: relative;
}
.site-logo em::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -5px;
  width: 4px;
  height: 4px;
  background: var(--color-accent);
  border-radius: 50%;
  animation: dotPulse 2.4s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.3); box-shadow: 0 0 6px var(--color-accent); }
}

/* --- Smooth anchor scroll offset for sticky header --- */
:target { scroll-margin-top: 80px; }

/* --- Reduce motion preference --- */
@media (prefers-reduced-motion: reduce) {
  .reviews-grid .review-card,
  .related-grid .related-card,
  .body-section,
  .hero-bg-lines,
  .site-logo em::after {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
