/* recap/polish.css — entrance + interaction animations for /recap
 * Presentation-only. Scoped to html[data-route="/recap"].
 * Reduced-motion fallbacks included.
 * G8 / polish/e1-remaining-routes 2026-06-09
 */

/* ── Keyframes ────────────────────────────────────────────── */
@keyframes rc-fade-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes rc-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes rc-badge-pop {
  from { opacity: 0; transform: scale(.6) rotate(-12deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes rc-score-count {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Entrance ─────────────────────────────────────────────── */
html[data-route="/recap"] .page-header {
  animation: rc-fade-rise .35s ease both;
}
html[data-route="/recap"] #card-controls {
  animation: rc-fade-rise .35s .08s ease both;
}
html[data-route="/recap"] #card-recap {
  animation: rc-fade-rise .4s .14s ease both;
}

/* ── Cards hover lift ─────────────────────────────────────── */
html[data-route="/recap"] .card.lift {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
html[data-route="/recap"] .card.lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  border-color: rgba(255, 26, 26, .2);
}

/* ── Controls ─────────────────────────────────────────────── */
html[data-route="/recap"] .ctl {
  transition: border-color .15s ease, box-shadow .15s ease;
}
html[data-route="/recap"] .ctl:focus {
  border-color: var(--red-primary, #FF1A1A);
  box-shadow: 0 0 0 3px rgba(255, 26, 26, .15);
  outline: none;
}

/* ── Load button ──────────────────────────────────────────── */
html[data-route="/recap"] #loadBtn {
  transition: transform .14s ease, box-shadow .14s ease;
}
html[data-route="/recap"] #loadBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(255, 26, 26, .25);
}
html[data-route="/recap"] #loadBtn:active {
  transform: translateY(0) scale(.97);
}
html[data-route="/recap"] #loadBtn:focus-visible {
  outline: 2px solid var(--red-primary, #FF1A1A);
  outline-offset: 3px;
}

/* ── Week badge pop ───────────────────────────────────────── */
html[data-route="/recap"] #recapWeekBadge:not([hidden]) {
  animation: rc-badge-pop .3s cubic-bezier(.34,1.56,.64,1) both;
}

/* ── Score/stat numbers ───────────────────────────────────── */
html[data-route="/recap"] .score-num,
html[data-route="/recap"] .recap-score,
html[data-route="/recap"] .winner-score {
  animation: rc-score-count .3s ease both;
}

/* ── Matchup rows in recap ────────────────────────────────── */
html[data-route="/recap"] .recap-matchup,
html[data-route="/recap"] .matchup-row {
  animation: rc-fade-rise .3s ease both;
  transition: background .15s ease;
}
html[data-route="/recap"] .recap-matchup:nth-child(1) { animation-delay: .1s; }
html[data-route="/recap"] .recap-matchup:nth-child(2) { animation-delay: .14s; }
html[data-route="/recap"] .recap-matchup:nth-child(3) { animation-delay: .18s; }
html[data-route="/recap"] .recap-matchup:nth-child(n+4){ animation-delay: .20s; }
html[data-route="/recap"] .recap-matchup:hover,
html[data-route="/recap"] .matchup-row:hover {
  background: rgba(255, 26, 26, .05);
}

/* ── Skeleton shimmer ─────────────────────────────────────── */
html[data-route="/recap"] .skeleton,
html[data-route="/recap"] .skel-row {
  background: linear-gradient(90deg,
    var(--bg-surface, #0a0a0a) 25%,
    #161616 50%,
    var(--bg-surface, #0a0a0a) 75%);
  background-size: 200% 100%;
  animation: rc-shimmer 1.5s infinite;
}

/* ── Reduced-motion overrides ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html[data-route="/recap"] .page-header,
  html[data-route="/recap"] #card-controls,
  html[data-route="/recap"] #card-recap,
  html[data-route="/recap"] .recap-matchup,
  html[data-route="/recap"] .matchup-row,
  html[data-route="/recap"] .score-num,
  html[data-route="/recap"] .recap-score,
  html[data-route="/recap"] .winner-score {
    animation: none;
    opacity: 1;
  }
  html[data-route="/recap"] #recapWeekBadge:not([hidden]) {
    animation: none;
  }
  html[data-route="/recap"] .skeleton,
  html[data-route="/recap"] .skel-row {
    animation: none;
    background: var(--bg-surface, #0a0a0a);
  }
  html[data-route="/recap"] .card.lift:hover,
  html[data-route="/recap"] #loadBtn:hover {
    transform: none;
  }
}
