/* "TLC in Numbers": a large "Games launched" card backed by a wall of our
   game icons, plus three stat rows. Dark cards and white text keep every
   number readable; count-up via assets/js/stats-counter.js. */

.stats {
  position: relative;
  padding: 110px 0;
  overflow: hidden;
  isolation: isolate;
}

.stats::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(45% 60% at 20% 60%, rgba(122, 52, 255, 0.22), transparent 70%),
    radial-gradient(40% 55% at 90% 30%, rgba(255, 122, 31, 0.1), transparent 70%);
}

/* ---------- Heading ---------- */
.stats__head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: end;
  gap: 20px 60px;
  margin-bottom: 48px;
}

.stats .stats__eyebrow {
  margin: 0 0 12px;
  color: var(--primary-color, #ff7a1f);
  font-family: var(--head-font);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dark .stats__title,
.stats__title {
  margin: 0;
  color: #fff;
  font-family: var(--head-font);
  font-size: clamp(2.2rem, 4.4vw, 3.5rem);
  line-height: 1.06;
}

.stats .stats__accent {
  display: inline-block;
  font: inherit;
  line-height: inherit;
  background: linear-gradient(90deg, #ffb347 0%, #ff7a1f 55%, #ff4f8b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.stats .stats__intro {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.7;
}

/* ---------- Layout ---------- */
.stats__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 24px;
}

/* Shared number + label styles (template sizes every p/span; override) */
.stats .stat__num {
  display: flex;
  align-items: baseline;
  margin: 0;
  color: #fff;
  font-family: var(--head-font);
  font-size: clamp(2.6rem, 4vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stats .stat__num span {
  font: inherit;
  line-height: inherit;
  color: inherit;
}

.stats .stat__num .stat__plus {
  margin-left: 2px;
  color: var(--accent, #ff7a1f);
}

.stats .stat__label {
  margin: 6px 0 0;
  color: #fff;
  font-family: var(--head-font);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
}

.stats .stat__sub {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
  line-height: 1.5;
}

/* ---------- Big card: icon wall ---------- */
.stats__hero {
  --accent: #ff7a1f;
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0c0f35;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  isolation: isolate;
}

.stats__wall {
  position: absolute;
  inset: -6% -4% auto -4%;
  z-index: -2;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  transform: rotate(-6deg);
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.stats__wall img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 22%;
  object-fit: cover;
}

/* Fade the icons into the card so the text sits on a solid dark area */
.stats__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, #0c0f35 22%, rgba(12, 15, 53, 0.85) 45%, rgba(12, 15, 53, 0.15) 80%),
    linear-gradient(90deg, rgba(12, 15, 53, 0.55), transparent 60%);
}

.stats__hero-copy {
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: 36px;
}

.stats .stat__num.stat__num--xl {
  font-size: clamp(4.5rem, 9vw, 7.5rem);
  line-height: 0.9;
}

.stats__hero .stat__label {
  font-size: 26px;
}

@media (hover: hover) {
  .stats__hero:hover .stats__wall { transform: rotate(-6deg) scale(1.05); }
}

/* ---------- Stat rows ---------- */
.stats__list {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stat {
  --accent: #ff7a1f;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 24px 28px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 5px solid var(--accent);
  background: #0c0f35;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.stat--pink   { --accent: #ff4f8b; }
.stat--teal   { --accent: #22d3c5; }
.stat--yellow { --accent: #ffc83d; }

.stat__icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--accent);
  color: #0c0f35;
  font-size: 26px;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--accent) 60%, #000);
}

@media (hover: hover) {
  .stat:hover { transform: translateX(6px); }
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .stats { padding: 80px 0; }
  .stats__head { grid-template-columns: 1fr; }
  .stats__layout { grid-template-columns: 1fr; }
  .stats__hero { min-height: 380px; }
}

@media (max-width: 575px) {
  .stats { padding: 64px 0; }
  .stats__head { margin-bottom: 32px; }
  .stats .stats__intro { font-size: 16px; }
  .stats__layout, .stats__list { gap: 16px; }
  .stats__hero { min-height: 330px; border-radius: 22px; }
  .stats__wall { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .stats__hero-copy { left: 24px; right: 24px; bottom: 24px; }
  .stats__hero .stat__label { font-size: 22px; }
  .stat { padding: 18px 20px; gap: 16px; border-radius: 20px; }
  .stat__icon { width: 52px; height: 52px; font-size: 21px; border-radius: 15px; }
  .stats .stat__num { font-size: 2.5rem; }
  .stats .stat__label { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .stat, .stats__wall { transition: none; }
}
