/* Hero proof deck (see hero-deck.js): real win screenshots cropped to their
   numbers, fanned as a deck. Without JavaScript or with reduced motion it is
   a still fan; with motion, the front card flips to the back every few
   seconds and the deck tilts toward the pointer. */
.hd {
  container-type: inline-size;
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  perspective: 1400px;
}
.hd-glow {
  position: absolute; inset: 6% 4% 10%; z-index: 0; pointer-events: none; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(109, 40, 217, .22), rgba(59, 158, 255, .12) 55%, transparent 100%);
  filter: blur(28px);
}
.hd-stage { position: absolute; inset: 0; z-index: 1; transform-style: preserve-3d; }
.hd-card {
  --x: 0; --y: 0; --r: 0; --s: 1; --o: 1;
  position: absolute; left: 50%; top: 56%; width: 84%; margin: 0;
  border-radius: 20px; overflow: hidden; background: #1C1D21;
  box-shadow: 0 44px 80px -34px rgba(10, 10, 15, .55), 0 0 0 1px rgba(10, 10, 15, .06);
  transform: translate(-50%, -50%) translate(calc(var(--x) * 1cqw), calc(var(--y) * 1cqw)) rotate(calc(var(--r) * 1deg)) scale(var(--s));
  opacity: var(--o);
  transition: transform .9s cubic-bezier(.34, 1.3, .5, 1), opacity .5s ease;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.hd-card img { display: block; width: 100%; height: auto; }
/* The still fan: front, two behind it, the rest tucked away. */
.hd-card:nth-child(1) { --x: 0; --y: 0; --r: -2; --s: 1; z-index: 4; }
.hd-card:nth-child(2) { --x: 8; --y: -10; --r: 5; --s: .93; z-index: 3; }
.hd-card:nth-child(3) { --x: -7; --y: -18; --r: -6; --s: .86; z-index: 2; }
.hd-card:nth-child(n+4) { --x: 3; --y: -24; --r: 3; --s: .8; --o: 0; z-index: 1; }
/* A light sweeps across each card as it reaches the front. */
.hd-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%);
  transform: translateX(-120%);
}
.hd-card.is-new::after { animation: hd-shine 1.1s .35s cubic-bezier(.3, .7, .3, 1) both; }
@keyframes hd-shine { 0% { opacity: 1; transform: translateX(-120%); } 100% { opacity: 1; transform: translateX(120%); } }

@media (prefers-reduced-motion: no-preference) {
  .hd-glow { animation: hd-breathe 9s ease-in-out infinite; }
  @keyframes hd-breathe { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.08); opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  .hd-card { transition: none; }
  .hd-card.is-new::after { animation: none; }
}
/* The results line directly under the deck (the deck shows real earnings). */
.hd-wrap { display: grid; gap: 10px; justify-items: center; min-width: 0; }
.hd-note {
  margin: 0; max-width: 46ch; padding: 0 8px; text-align: center;
  font-size: 13px; line-height: 1.5; color: rgba(10, 10, 15, .62);
}
/* Desktop: give the deck almost half the hero so the numbers read at a glance
   (the Studio theme's split gives proof tiles a third). Headline type steps
   down a little to keep its line count. */
@media (min-width: 1024px) {
  :root[data-theme=studio] .studio-hero .hero-grid:has(.hd) { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  :root[data-theme=studio] .studio-hero:not(.studio-hero-creator) .hero-grid:has(.hd) .hero-title { font-size: clamp(2rem, .8rem + 2.3vw, 3.1rem); }
  :root[data-theme=studio] .studio-hero-creator .hero-grid:has(.hd) .hero-title { font-size: clamp(2.5rem, 1.1rem + 3.3vw, 4.25rem); }
  .hd { max-width: 620px; }
  .hd-card { width: 90%; }
}
@media (max-width: 640px) {
  .hd { aspect-ratio: 1 / .92; }
  .hd-card { width: 88%; top: 58%; border-radius: 16px; }
}
