/* Sell Your Soul: the all-souls page. Loads after felt.css and landing.css.
   The rod, the hooks and the hanging souls are the home page rail's own rules (landing.css), so a soul looks the
   same in both places. This sheet sets what is different here: the header sits in the flow, there is one rod for
   each trade, the rods do not pin or move with the scroll, and a rod with few souls hangs them in the middle. */

.page-souls .topbar { position: relative; inset: auto; }
.all-souls-page { position: relative; padding: clamp(34px, 5vw, 70px) 0 clamp(60px, 8vw, 110px); overflow-x: clip; }

.souls-head { text-align: center; }
.souls-head .title { font-size: clamp(48px, 6.4vw, 96px); }
.souls-head .lede { margin-inline: auto; }
.soul-search { width: min(620px, 100%); margin: 0 auto; text-align: left; }
.soul-search .askbox-label { display: block; margin: 0 0 6px 6px; }
.soul-search .felt-input { padding-right: 10px; gap: 6px; }
.soul-search input[type="search"] { appearance: none; -webkit-appearance: none; }
.soul-search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.soul-search .patch { position: relative; z-index: 1; flex: none; }

.topics { justify-content: center; margin: 18px auto 0; max-width: 900px; }
.topics a { text-decoration: none; }
.topics a:hover { color: var(--amber); }
.topics a:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.souls-status { min-height: 1.5em; margin: 16px 0 0; font-weight: 700; color: var(--lilac-text); }

/* ---------- one rod for each trade ---------- */
.rods { margin-top: clamp(20px, 3vw, 40px); }
.rod-row { position: relative; margin-top: clamp(26px, 4vw, 54px); scroll-margin-top: 16px; }
.rod-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 14px; margin: 0 0 12px; text-align: center; }
.rod-title { margin: 0; font: 400 clamp(34px, 3.4vw, 50px)/1 var(--display); letter-spacing: .01em; color: var(--cream); }
.rod-count { font-weight: 800; font-size: 15px; color: var(--lilac-text); }
/* A real soul's picture is square (640 by 640), so the frame is square here. */
.rod-row .track { --ar: 1; }
/* Few souls: they hang in the middle. Many: the rod scrolls sideways from its left end (auto margins give way). */
.rod-row .track > :first-child { margin-left: auto; }
.rod-row .track > :last-child { margin-right: auto; }
.rod-row .track:focus-visible { outline: 3px solid var(--amber); outline-offset: -3px; }
.rod-row .ask { opacity: 1; }
.rod-hint { margin: 2px 0 0; text-align: center; font-weight: 800; font-size: 15px; color: var(--amber); }

/* A slow sway, each soul at its own pace. Only the hanging part moves: the link over it stays still. */
@media (prefers-reduced-motion: no-preference) {
  .rod-row .swing { animation: soul-sway 5.2s ease-in-out infinite alternate; }
  .rod-row .soul:nth-child(3n) .swing { animation-duration: 6.4s; animation-delay: -2.1s; }
  .rod-row .soul:nth-child(3n + 1) .swing { animation-duration: 4.6s; animation-delay: -1.2s; }
  .rod-row .hit:hover ~ .swing, .rod-row .hit:focus-visible ~ .swing { animation-play-state: paused; }
}
@keyframes soul-sway { from { transform: rotate(-1.6deg); } to { transform: rotate(1.6deg); } }

.souls-sell { margin-top: clamp(50px, 7vw, 100px); text-align: center; }
.souls-sell .lede { margin-inline: auto; }
.souls-sell .patch-row { justify-content: center; }
