/* ========== PROBLEM: pains get crossed out, Hear answers ==========
   When the list scrolls into view (problem.js), each pain is struck through in turn,
   then a Hear card closes the list. Without JS, or with reduced motion, the list shows
   its finished state. */

/* <s> inside a plain <span>: the flex item is the span, so the strike follows each line */
.pain-text {
  text-decoration: none;
  background-image: linear-gradient(rgba(244, 63, 94, 0.75), rgba(244, 63, 94, 0.75));
  background-repeat: no-repeat;
  background-position: 0 58%;
  background-size: 100% 1.5px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: color 0.4s;
}
.pain-list .pain-item .pain-text { color: rgba(161, 161, 170, 0.6); }

.pain-answer {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1.125rem 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.08);
  color: var(--text, #fafafa);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
}
/* the site's logo mark at 20 px */
.pain-mark {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 5px;
  background: var(--purple, #8b5cf6);
  overflow: hidden;
}
.pain-mark::before,
.pain-mark::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1.5px solid #fff;
  border-radius: 50%;
}
.pain-mark::before { width: 10px; height: 10px; margin: -5px 0 0 -5px; opacity: 0.9; }
.pain-mark::after { width: 16px; height: 16px; margin: -8px 0 0 -8px; opacity: 0.4; }

/* ---- playback ---- */
@keyframes pain-strike { from { background-size: 0% 1.5px; } to { background-size: 100% 1.5px; } }
@keyframes pain-dim { from { color: var(--muted-light, #a1a1aa); } to { color: rgba(161, 161, 170, 0.6); } }
@keyframes pain-x { 0% { transform: scale(1) rotate(0); } 45% { transform: scale(1.5) rotate(90deg); } 100% { transform: scale(1) rotate(90deg); } }
@keyframes pain-answer-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.pain-js:not(.is-play) .pain-text { background-size: 0% 1.5px; color: var(--muted-light, #a1a1aa); }
.pain-js:not(.is-play) .pain-answer { opacity: 0; }

.pain-js.is-play .pain-text {
  animation: pain-strike 0.45s cubic-bezier(0.65, 0, 0.35, 1) var(--t) both,
             pain-dim 0.4s ease-out calc(var(--t) + 0.35s) both;
}
.pain-js.is-play .pain-icon { animation: pain-x 0.45s cubic-bezier(0.34, 1.4, 0.64, 1) var(--t) both; }
.pain-js.is-play .pain-item:nth-child(1) { --t: 0s; }
.pain-js.is-play .pain-item:nth-child(2) { --t: 0.45s; }
.pain-js.is-play .pain-item:nth-child(3) { --t: 0.9s; }
.pain-js.is-play .pain-item:nth-child(4) { --t: 1.35s; }
.pain-js.is-play .pain-answer { animation: pain-answer-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) 2s both; }

@media (prefers-reduced-motion: reduce) {
  .pain-list * { animation: none !important; }
}
