/* Portada: el botín de la guerra (trofeos.js). Tres filas de cartas que se desplazan de costado,
   alternando el sentido. Tokens y botones de iso.css (guía de estilo dev-docs/ui-kit.html). */
#trofeos {
  --tr-size: clamp(134px, 11.76vw, 160px);
  padding: 32px 0 112px; background: var(--noche); color: var(--pergamino); overflow: hidden;
}
/* título H1 de la guía (72/1) con el remate en itálica ámbar, y el lead de 18 */
#trofeos h2 { margin: 0; padding: 0 16px; text-align: center; font: 400 clamp(44px, 6vw, 72px)/1 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
#trofeos h2 span, #trofeos h2 em { display: block; }
#trofeos h2 em { color: var(--ambar); font-style: italic; }
.tr-lead { max-width: 600px; margin: 24px auto 0; padding: 0 16px; text-align: center; font-size: 18px; line-height: 1.5; color: var(--ceniza); text-wrap: pretty; }
.tr-cta { width: fit-content; margin: 56px auto 0; }
.tr-rows { display: grid; gap: 0; margin-top: 28px; }
/* bordes que se funden con el fondo */
.tr-row { padding: 14px 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
/* la pista lleva el mismo juego de piezas repetido 4 veces y avanza un cuarto: el corte no se ve */
.tr-track { display: flex; width: max-content; animation: tr-izq var(--tr-dur, 60s) linear infinite; }
.tr-row.der .tr-track { animation-name: tr-der; }
.tr-card { all: unset; display: block; flex: none; margin-right: 12px; cursor: zoom-in; border-radius: 8px; transition: transform .18s, filter .18s; }
.tr-card:hover { transform: translateY(-2px) scale(1.03); filter: drop-shadow(0 0 6px rgba(240, 169, 60, .3)); }
.tr-card:focus-visible { outline: 2px solid var(--ambar); outline-offset: 3px; }
.tr-card .carta { --carta-w: var(--tr-size); box-shadow: 0 calc(var(--carta-w) * .01) calc(var(--carta-w) * .09) rgba(0, 0, 0, .38); } /* sombra centrada y corta (la de carta.css cae hacia abajo) */
@keyframes tr-izq { from { transform: translateX(0); } to { transform: translateX(-25%); } }
@keyframes tr-der { from { transform: translateX(-25%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) {
  .tr-track { animation: none; }
  .tr-row { overflow-x: auto; }
}

/* Carta en grande (trofeos.js): la misma que CardZoom de la web. Se ve igual en los dos temas. */
.tz { --glow: 240, 169, 60; position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 16px; border: 0;
  background: transparent; color: #F5EEDC; display: flex; align-items: center; justify-content: center; overflow: hidden; animation: tz-in .22s ease-out; }
.tz:not([open]) { display: none; }
.tz.red { --glow: 224, 122, 85; }
.tz::backdrop { background: radial-gradient(circle, rgba(20, 17, 14, .82) 0 45%, rgba(20, 17, 14, .55) 80%); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: tz-in .22s ease-out; }
.tz.leaving, .tz.leaving::backdrop { animation: tz-out .22s ease-in forwards; }
.tz.leaving .tz-stage { animation: tz-cardout .22s ease-in forwards; }
.tz-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid #3A3128; cursor: pointer;
  background: rgba(30, 26, 21, .9); color: #F5EEDC; font-size: 16px; display: grid; place-items: center; }
.tz-close:hover { border-color: var(--ambar); color: var(--ambar); }
.tz-close:focus-visible { outline: 2px solid var(--ambar); outline-offset: 2px; }
.tz-stage { --w: min(320px, 72vw, 52dvh); display: flex; flex-direction: column; align-items: center; animation: tz-cardin .5s cubic-bezier(.2, 1.4, .4, 1); }
.tz-float { animation: tz-bob 4.5s ease-in-out infinite; perspective: 900px; }
.tz-tilt { position: relative; display: block; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; transition: transform .25s ease-out; animation: tz-sway 9s ease-in-out infinite; }
.tz-tilt:hover { animation-play-state: paused; }
.tz-tilt .carta { --carta-w: var(--w) !important; display: block; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); animation: tz-glow 2.8s ease-in-out infinite; }
.tz-halo { position: absolute; inset: -14%; border-radius: 50%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--glow), .55), rgba(var(--glow), .18) 60%, transparent); filter: blur(18px); animation: tz-halo 2.8s ease-in-out infinite; }
.tz-shine { position: absolute; inset: 0; border-radius: calc(var(--w) * .07); overflow: hidden; pointer-events: none; mix-blend-mode: soft-light;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, .55), transparent 55%); }
.tz-shine::after { content: ""; position: absolute; top: -20%; bottom: -20%; width: 45%; left: -60%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .85), transparent); animation: tz-sweep 3.6s ease-in-out infinite .6s; }
.tz-pills { position: relative; z-index: 2; margin-top: calc(var(--w) * -.16); display: flex; flex-direction: column; align-items: center; gap: 8px;
  max-width: min(480px, calc(100vw - 32px)); animation: tz-pillsin .45s ease-out .15s both; }
.tz-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
.tz-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; white-space: nowrap;
  font: 500 12px/1.3 var(--mono); letter-spacing: .02em; color: #F5EEDC; background: rgba(30, 26, 21, .92); border: 1px solid #3A3128; box-shadow: 0 8px 22px rgba(0, 0, 0, .45); }
.tz-pill i { font-style: normal; }
.tz-name { align-self: stretch; justify-content: center; padding: 8px 20px; white-space: normal; text-align: center;
  font: 400 25px/1.1 var(--serif); letter-spacing: 0; border-color: rgba(var(--glow), .7); box-shadow: 0 0 18px rgba(var(--glow), .35), 0 8px 22px rgba(0, 0, 0, .45); }
.tz-tier { flex-direction: column; justify-content: center; gap: 1px; padding: 6px 16px; border-radius: 18px; color: #1A1A18;
  background: linear-gradient(135deg, #F7D488, #F0A93C 55%, #C8861F); border-color: #F7D488; }
.tz-tier-top { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.tz-tier-top b { font-weight: 700; }
.tz-drop { font-size: 10px; font-weight: 500; letter-spacing: .03em; opacity: .8; }
.tz-ico { font-size: 18px; line-height: 1; }
.tz.red .tz-tier { background: linear-gradient(135deg, #F2A68A, #E07A55 55%, #B0492A); border-color: #F2A68A; }
@keyframes tz-in { from { opacity: 0; } }
@keyframes tz-out { to { opacity: 0; } }
@keyframes tz-cardin { from { opacity: 0; transform: translateY(40px) scale(.6) rotate(-8deg); } }
@keyframes tz-cardout { to { opacity: 0; transform: translateY(20px) scale(.85); } }
@keyframes tz-pillsin { from { opacity: 0; transform: translateY(10px); } }
@keyframes tz-bob { 0%, 100% { transform: translateY(-6px); } 50% { transform: translateY(6px); } }
@keyframes tz-sway { 0%, 100% { rotate: y -6deg; } 50% { rotate: y 6deg; } }
@keyframes tz-glow { 0%, 100% { box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 18px rgba(var(--glow), .35); }
  50% { box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 42px rgba(var(--glow), .75), 0 0 2px 1px rgba(var(--glow), .9); } }
@keyframes tz-halo { 0%, 100% { opacity: .65; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes tz-sweep { 0% { left: -60%; } 55%, 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) {
  .tz, .tz::backdrop, .tz-stage, .tz-pills, .tz-float, .tz-tilt, .tz-tilt .carta, .tz-halo, .tz-shine::after { animation: none !important; }
  .tz-tilt { transition: none; }
}
