/* Styles specific to /turn-animals-into-pokemon (loaded after styles.css and
   pillar.css, which carry the shared rp-* system this page is built from). */

/* --- The card wall -------------------------------------------------------- */
/* One real card per species, 4-up. The wall IS the argument — the cards do
   the talking, so no captions: every card already prints its own name. */
.tw-wall {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.tw-wall img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.5);
  transition: transform 0.18s ease;
}
@media (hover: hover) {
  .tw-wall li:hover img { transform: translateY(-6px) rotate(-1deg); }
}
.tw-wall-credit {
  font-size: 18px;
  color: var(--text-dim);
  margin: 26px 0 0;
  text-align: center;
}

/* --- Before/after pairs ----------------------------------------------------
   Desktop reads each pair the way you'd say it: photo → arrow → card, then
   the story — one row per animal. The 7fr:5fr tracks keep the square-cropped
   photo and the 640x894 card the same rendered height; mobile stacks the same
   pieces vertically (photo on top, arrow pointing down at the card). */
.tw-pairs {
  list-style: none;
  margin: 44px auto 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  max-width: 920px;
}
.tw-pair {
  display: grid;
  grid-template-columns: minmax(0, 7fr) auto minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  column-gap: 24px;
}
.tw-pair-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 3px solid var(--border);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.5);
}
.tw-pair-arrow {
  display: block;
  font-family: 'Press Start 2P', monospace;
  font-size: 18px;
  color: var(--gold);
  transform: rotate(-90deg); /* the ▼ in the markup points at the card on mobile */
  text-shadow: -2px 2px 0 rgba(0, 0, 0, 0.55); /* reads as 2px 2px once rotated */
}
.tw-pair-card {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.5);
}
.tw-pair p {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 30ch;
  margin: 0;
}
.tw-pair p em { color: var(--gold); font-style: normal; }
@media (max-width: 719px) {
  .tw-pairs { gap: 44px; max-width: 420px; }
  .tw-pair { display: block; text-align: center; }
  .tw-pair-arrow { margin: 14px 0; transform: none; text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.55); }
  .tw-pair-card { width: 86%; margin: 0 auto; }
  .tw-pair p { margin: 14px auto 0; }
}

/* --- Transformation showcases ----------------------------------------------
   Layout comes from pillar.css's .rp-showcase system; this page only adds
   copy styling, a top margin under the section heading, and a flipped
   variant (stage on the left) so two showcases in a row don't read as the
   same layout twice. */
.rp-section .rp-showcase { margin-top: 36px; }
.tw-copy p { font-size: 19px; margin: 0 0 16px; max-width: 60ch; }
.tw-copy strong { color: var(--gold); }
.tw-flip { flex-direction: row-reverse; }

/* --- TCG disambiguation aside --------------------------------------------- */
.tw-tcg {
  margin: 44px auto 0;
  max-width: 820px;
  background: var(--panel);
  border: 3px solid var(--border);
  border-left: 8px solid var(--gold);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
  padding: 18px 22px;
}
.tw-tcg p { font-size: 19px; margin: 0; max-width: 70ch; }
.tw-tcg strong { color: var(--gold); }

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 979px) {
  .tw-wall { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}
@media (max-width: 719px) {
  .tw-wall { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .tw-flip { flex-direction: column; }
}

/* Stagger the wall's scroll reveal by column so it deals like a hand of
   cards. (rv/rv-on come from pillar.css + fx.js.) The pattern follows the
   grid's column count at each breakpoint; the :nth-child(n) rows reset the
   wider pattern at equal specificity before the narrower one applies. */
.rv-on .tw-wall li:nth-child(4n + 2) { transition-delay: 0.06s; }
.rv-on .tw-wall li:nth-child(4n + 3) { transition-delay: 0.12s; }
.rv-on .tw-wall li:nth-child(4n)     { transition-delay: 0.18s; }
@media (max-width: 979px) {
  .rv-on .tw-wall li:nth-child(n)      { transition-delay: 0s; }
  .rv-on .tw-wall li:nth-child(3n + 2) { transition-delay: 0.06s; }
  .rv-on .tw-wall li:nth-child(3n)     { transition-delay: 0.12s; }
}
@media (max-width: 719px) {
  .rv-on .tw-wall li:nth-child(n)  { transition-delay: 0s; }
  .rv-on .tw-wall li:nth-child(2n) { transition-delay: 0.06s; }
}
