/* Leader trading cards (Nov 5): Nia's "HW Political Family" decks. OG Deck on The Movement, Leaders On Deck on Legacy.
   Photo front framed in one deck color, career on the back. Tap, click or Enter flips a card. See cards.js. */
.deck { --deck: var(--hw-purple); --deck-ink: #fff; background: var(--newsprint); padding: clamp(56px, 7vw, 100px) 0; }
.deck--ondeck { --deck: var(--hw-navy); --deck-accent: var(--hw-gold); background: var(--paper); }
.deck__intro { font-size: 21px; line-height: 1.55; max-width: 46em; margin: 0 0 clamp(28px, 3vw, 40px); }
.deck__head h2 { margin-top: 14px; }
.deck__head .section-head__lede { max-width: 40em; margin-top: 10px; }
.deck__hint { margin: 18px 0 0; font: 600 15px/1.4 var(--sans); letter-spacing: .04em; color: var(--grey-700); }

.deck__list { list-style: none; margin: clamp(24px, 3vw, 36px) 0 0; padding: 0; display: grid; gap: clamp(18px, 2vw, 28px);
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }
@media (max-width: 599.98px) {
  .deck__list { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 6px 16px 18px; margin-inline: -16px; scroll-padding-inline: 16px; }
  .deck__list > li { scroll-snap-align: start; }
}

.deck__list > li { display: flex; }
.tcard { position: relative; flex: 1; perspective: 1400px; }
.tcard__btn { position: absolute; inset: 0; z-index: 2; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 12px; }
.tcard__inner { display: grid; height: 100%; aspect-ratio: 5 / 7; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.4,.1,.2,1); }
.tcard.is-flipped .tcard__inner { transform: rotateY(180deg); }
.tcard__face { grid-area: 1 / 1; position: relative; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 12px;
  background: #1C1C1F; box-shadow: 0 12px 26px rgba(1,31,91,.2), 0 2px 4px rgba(0,0,0,.12); display: flex; flex-direction: column; }
.tcard__back { transform: rotateY(180deg); background: var(--deck); }
.tcard:hover .tcard__face, .tcard__btn:focus-visible ~ .tcard__inner .tcard__face { box-shadow: 0 18px 34px rgba(1,31,91,.28), 0 2px 4px rgba(0,0,0,.12); }
.tcard__btn:focus-visible { outline: 3px solid var(--hw-gold); outline-offset: 4px; }

/* Front (modern collectible, Nov 5): full-bleed photo, angled deck-color band, bold caps name */
.tcard__photo { position: absolute; inset: 0; display: grid; place-items: end center; background: #2A2A2E; }
.tcard__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; filter: grayscale(1) contrast(1.08); }
.tcard__sil { width: 78%; margin-bottom: 22%; fill: #55555B; }
.tcard__team { position: absolute; z-index: 1; top: 12px; right: 12px; font: 800 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  background: var(--hw-gold); color: var(--ink); padding: 6px 8px 5px; border-radius: 2px; }
.tcard__plate { position: absolute; left: 0; right: 0; bottom: 0; min-height: 34%; padding: 0 14px 14px; color: #fff;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.tcard__plate::before { content: ""; position: absolute; inset: 0; background: var(--deck); clip-path: polygon(0 34%, 100% 0, 100% 100%, 0 100%); }
.tcard__plate::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 34%; background: var(--hw-gold);
  clip-path: polygon(0 100%, 100% 0, 100% 9%, 0 calc(100% + 9%)); }
.tcard__name { position: relative; font: 800 clamp(20px, 1.9vw, 24px)/.98 var(--sans); letter-spacing: -.01em; text-transform: uppercase; }
.tcard__flip { position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--deck); }
.tcard__flip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Back: solid deck color, the career as a timeline */
.tcard__card { flex: 1; color: #fff; padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 12px; }
.tcard__bname { font: 800 18px/1.05 var(--sans); text-transform: uppercase; letter-spacing: -.005em; padding-bottom: 10px; border-bottom: 3px solid var(--hw-gold); }
.tcard__lines { list-style: none; margin: 0; padding: 0 0 0 14px; display: grid; gap: 8px; font-size: 14.5px; line-height: 1.35; border-left: 2px solid rgba(255,255,255,.35); }
.tcard__lines li { position: relative; }
.tcard__lines li::before { content: ""; position: absolute; left: -20px; top: .4em; width: 10px; height: 10px; background: var(--hw-gold); border-radius: 50%; }
.tcard__credit { font-size: 11.5px; line-height: 1.35; color: rgba(255,255,255,.78); }
.tcard__foot { margin-top: auto; font: 800 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--hw-gold); }

/* No JS: no flipping, show front and back stacked */
html:not(.js) .tcard__inner { aspect-ratio: auto; transform: none; gap: 10px; }
html:not(.js) .tcard__face { grid-area: auto; backface-visibility: visible; transform: none; }
html:not(.js) .tcard__front { aspect-ratio: 5 / 7; }
html:not(.js) .tcard__flip, html:not(.js) .tcard__btn, html:not(.js) .deck__hint { display: none; }
@media (prefers-reduced-motion: reduce) { .tcard__inner { transition: none; } }
