/* The top-5 card (scenes/top5.js cardEl): story 12 and the landing hero. Inside .t5-card, cqw = card width. */
/* Symmetric easing: edge-on at .4 s, when the faces swap visibility (WebKit: animated layers on the front
   ignore backface-visibility and would bleed onto the back). */
.t5-card { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.45,.05,.55,.95); cursor: pointer; container-type: inline-size; outline-offset: 1cqw; text-align: left; }
.t5-card p { margin: 0; } /* the card is used outside .scene too (landing): no browser paragraph margins */
.t5-card.flipped { transform: rotateY(180deg); }
.t5-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: visibility 0s .4s; }
.t5-back { transform: rotateY(180deg); visibility: hidden; }
.t5-card.flipped .t5-front { visibility: hidden; }
.t5-card.flipped .t5-back { visibility: visible; }
.t5-body { position: absolute; left: 0; top: 0; bottom: 0; width: 87%; overflow: hidden; background: #0b0a0f;
  border-radius: 18.6% 0 0 4.66% / 13.3% 0 0 3.33%; box-shadow: 0 3cqw 8cqw rgba(0,0,0,.55); }
.t5-disc { position: absolute; left: 6.2%; top: 5.9%; width: 72%; aspect-ratio: 1; border-radius: 50%; padding: .9%;
  background: conic-gradient(from 210deg, #f4f4f8, #8d8f9c, #ffffff, #6f7180, #e9e9f0, #9a9caa, #f4f4f8); }
.t5-disc img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
/* Name: 1-2 balanced lines sitting 2.6cqw above the rule, growing up towards the cover (fitBox caps it at 2 lines, 29cqw). */
.t5-name { position: absolute; left: 6.5%; bottom: calc(24.4% + 2.6cqw); max-width: 89%; text-wrap: balance; font: 800 17cqw/.9 var(--font-condensed); color: #ecf6ff; letter-spacing: .005em; text-transform: uppercase; }
.t5-rule { position: absolute; left: 6.5%; right: 4%; top: 75.6%; height: 1px; background: rgba(255,255,255,.55); }
.t5-stat { position: absolute; top: 78.4%; }
.t5-h { left: 6.5%; } .t5-p { left: 41%; right: 4%; }
.t5-stat b { display: block; font-weight: 700; font-size: 3.3cqw; line-height: 1.2; letter-spacing: .04em; color: #fff; }
.t5-stat span { display: block; margin-top: 1.4cqw; font: 800 8.6cqw/1 var(--font-condensed); color: #fff; white-space: nowrap; }
.t5-sheen { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: .55;
  background: linear-gradient(115deg, transparent 32%, rgba(160,140,255,.55) 42%, rgba(120,235,255,.5) 48%, rgba(215,247,91,.45) 53%, rgba(255,170,120,.45) 58%, transparent 68%);
  background-size: 260% 260%; animation: t5Sheen 3.6s ease-in-out infinite; }
@keyframes t5Sheen { from { background-position: 100% 100%; } to { background-position: 0% 0%; } }
.t5-glitter { position: absolute; inset: 0; pointer-events: none; }
.t5-glitter i { position: absolute; width: var(--s); height: var(--s); border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #ffe9b3 45%, transparent 70%); opacity: 0; animation: t5Twinkle var(--t) var(--d) ease-in-out infinite; }
@keyframes t5Twinkle { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: .95; transform: scale(1); } }
.t5-tab { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.t5-brand, .t5-rank { position: absolute; writing-mode: vertical-rl; white-space: nowrap; line-height: 1.2; }
.t5-brand { left: 86.6%; top: 4%; font: 800 5.2cqw/1.2 var(--font-condensed); letter-spacing: .02em; color: #1b1638; }
.t5-rank { left: 90.4%; top: 52%; font-weight: 700; font-size: 3.4cqw; letter-spacing: .06em; color: #1b1638; }
.t5-back-label { position: absolute; left: 50%; top: 50%; translate: -50% -50%; writing-mode: vertical-rl; rotate: 180deg;
  font: 800 9cqw/1.2 var(--font-condensed); letter-spacing: .04em; color: #b9aefc; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  /* Flipped with fades, no rotation; glitter stays still. */
  .t5-card, .t5-card.flipped, .t5-back { transform: none !important; }
  .t5-face { transition: opacity .3s ease, visibility 0s; }
  .t5-back { opacity: 0; }
  .t5-card.flipped .t5-front { opacity: 0; }
  .t5-card.flipped .t5-back { opacity: 1; }
  .t5-glitter i { opacity: .6; }
}
