/* story.css — the timeline. Transform owners: .st-line = scaleY (scroll) · .st-item = entrance · .st-node = heartbeat. */

.st-center { max-width: 880px; }
.st-count {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  padding: 10px 16px;
  font-weight: 500;
  font-size: 15px;
  text-shadow: var(--text-shadow);
}
.st-count-num { font-family: var(--font-love); font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.st-count-label { font-size: 15px; }

.st-timeline { position: relative; width: 100%; max-width: 560px; padding: 8px 0 12px; }
.st-timeline.is-empty { display: none; }
.st-line {
  position: absolute;
  top: 8px;
  bottom: 12px;
  left: 27px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(rgba(255, 255, 255, .7), rgba(255, 255, 255, .12));
  box-shadow: 0 0 8px rgba(255, 255, 255, .5);
  transform-origin: top;
  transform: scaleY(var(--p, .08));
  transition: transform .2s linear;
}
.st-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.st-item {
  position: relative;
  padding-left: 60px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.st-item.is-in { opacity: 1; transform: none; }
.st-node {
  position: absolute;
  left: 14px;
  top: 16px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, .9)) drop-shadow(0 0 14px rgba(255, 150, 185, .8));
}
.st-node::before { content: ""; position: absolute; inset: -8px; }       /* bigger tap target */
.st-node-heart { width: 28px; height: 25px; }
.st-item.is-in .st-node { animation: heartbeat 1.1s ease-in-out .35s 1; }
.st-item .st-node.is-beat { animation: stBeat 1.1s ease-in-out 1; }   /* same specificity as the entrance rule, later → wins */
@keyframes stBeat { 0%, 60%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } 45% { transform: scale(1.18); } }
.st-item.is-last .st-node::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .8);
  animation: stRing 2.2s ease-out infinite;
  pointer-events: none;
}
@keyframes stRing { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }

.st-card { padding: 16px 18px; text-align: left; }
.st-date { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #fff; opacity: .92; text-shadow: var(--text-shadow); }
.st-title { margin-top: 4px; font-size: 21px; font-weight: 600; line-height: 1.25; color: #fff; text-shadow: var(--text-shadow); }
.st-text { margin-top: 6px; font-size: 16px; font-weight: 500; line-height: 1.5; color: #fff; text-shadow: var(--text-shadow); }
.st-photo { margin-top: 12px; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; background: rgba(255, 255, 255, .12); }
.st-photo img { width: 100%; height: 100%; object-fit: cover; }

/* wide screens: cards alternate around a centre line */
@media (min-width: 720px) {
  .st-timeline { max-width: 880px; }
  .st-line { left: 50%; margin-left: -1px; }
  .st-item { width: 50%; padding-left: 0; }
  .st-item.is-left { align-self: flex-start; padding-right: 44px; }
  .st-item.is-right { align-self: flex-end; padding-left: 44px; }
  .st-item.is-left .st-node { left: auto; right: -14px; }
  .st-item.is-right .st-node { left: -14px; }
  .st-item.is-left .st-card { text-align: right; }
}

@media (max-height: 680px) {
  .st-list { gap: 14px; }
  .st-card { padding: 14px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .st-item { opacity: 1; transform: none; transition: none; }
  .st-line { transform: none; transition: none; }
  .st-item.is-last .st-node::after { animation: none; opacity: .6; }
}
