/* XES — /games.html
   Extends site.css + landing.css tokens. Never loaded on other pages. */

/* ── Page glow backdrop ─────────────────────────────────────────── */
.games-page::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at 75% 10%,  rgba(139,127,255,.22), transparent 65%),
    radial-gradient(700px 500px at 15% 80%,  rgba(79,127,255,.18),  transparent 65%),
    radial-gradient(500px 400px at 50% 50%,  rgba(251,191,36,.07),  transparent 65%);
}

/* ── Hero ───────────────────────────────────────────────────────── */
.games-hero {
  padding: clamp(4rem, 9vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.games-h1 {
  font-family: "Exo 2", system-ui, sans-serif;
  font-size: clamp(2.6rem, 5.5vw, 4.5rem);
  line-height: 1.05; font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 1.2rem;
  color: var(--text);
}
.games-h1 .grad {
  background: linear-gradient(100deg, #6b93ff 10%, #a599ff 55%, #fbbf24 110%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.games-hero-sub {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--text-muted); line-height: 1.65;
  max-width: 34em; margin: 0 auto 2.2rem;
}
.games-hero-ctas {
  display: flex; gap: 1rem; flex-wrap: wrap;
  justify-content: center;
}

/* floating emoji strip behind the hero text */
.games-floaties {
  position: absolute; inset: 0; pointer-events: none; z-index: -1;
  overflow: hidden;
}
.games-floaties span {
  position: absolute;
  font-size: clamp(1.8rem, 4vw, 3rem);
  opacity: .07;
  animation: gf-float 12s ease-in-out infinite;
  user-select: none;
}
.games-floaties span:nth-child(1) { top: 8%;  left: 5%;  animation-delay: 0s;   }
.games-floaties span:nth-child(2) { top: 20%; right: 7%; animation-delay: -2s;  }
.games-floaties span:nth-child(3) { top: 55%; left: 3%;  animation-delay: -4s;  }
.games-floaties span:nth-child(4) { top: 70%; right: 4%; animation-delay: -6s;  }
.games-floaties span:nth-child(5) { top: 35%; left: 8%;  animation-delay: -1s;  }
.games-floaties span:nth-child(6) { top: 85%; left: 20%; animation-delay: -3s;  }
.games-floaties span:nth-child(7) { top: 15%; left: 30%; animation-delay: -8s;  }
.games-floaties span:nth-child(8) { top: 75%; right: 15%;animation-delay: -5s;  }
@keyframes gf-float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-18px) rotate(3deg); }
}

/* ── Mode banner ────────────────────────────────────────────────── */
.games-mode-strip {
  display: flex; gap: 1rem; flex-wrap: wrap;
  justify-content: center;
  padding: 0 0 clamp(2.5rem, 5vw, 4rem);
}
.games-mode-card {
  flex: 1; min-width: 240px; max-width: 380px;
  padding: 1.6rem 1.8rem;
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(61,61,133,.38), rgba(20,22,42,.52));
  border: 1px solid rgba(139,127,255,.22);
  backdrop-filter: blur(8px);
  transition: border-color .2s, transform .2s;
}
.games-mode-card:hover { border-color: rgba(139,127,255,.55); transform: translateY(-2px); }
.games-mode-card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.games-mode-card-icon.solo   { background: rgba(79,127,255,.18);  }
.games-mode-card-icon.invite { background: rgba(251,191,36,.15);  }
.games-mode-card h3 {
  font-family: "Exo 2", system-ui, sans-serif;
  font-size: 1.15rem; font-weight: 700; margin: 0 0 .5rem; color: var(--text);
}
.games-mode-card p { color: var(--text-muted); font-size: .95rem; line-height: 1.55; margin: 0; }

/* ── Game grid ──────────────────────────────────────────────────── */
.games-section {
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem);
}
.games-section-header {
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.games-section-header h2 {
  font-family: "Exo 2", system-ui, sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700; margin: .6rem 0 .8rem; color: var(--text);
}
.games-section-header p { color: var(--text-muted); max-width: 40em; margin: 0 auto; line-height: 1.6; }

.games-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}
@media (max-width: 960px) { .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .games-grid { grid-template-columns: 1fr; } }

.game-card {
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(61,61,133,.4), rgba(20,22,42,.55));
  border: 1px solid rgba(139,127,255,.2);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  position: relative;
}
.game-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(60% 60% at 50% 0%, rgba(139,127,255,.14), transparent 70%);
  opacity: 0; transition: opacity .3s ease; pointer-events: none;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139,127,255,.5);
  box-shadow: 0 16px 40px rgba(0,0,0,.4), 0 0 0 1px rgba(139,127,255,.15);
}
.game-card:hover::before { opacity: 1; }

/* Image area */
.game-card-img {
  width: 100%; aspect-ratio: 16 / 9;
  overflow: hidden; position: relative;
  background: rgba(8, 9, 26, .6);
}
.game-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.game-card:hover .game-card-img img { transform: scale(1.04); }
.game-card-img .game-emoji-fallback {
  display: flex; align-items: center; justify-content: center;
  height: 100%; font-size: 4rem;
  background: linear-gradient(135deg, rgba(61,61,133,.5), rgba(8,9,26,.7));
}

/* Card body */
.game-card-body {
  padding: 1.25rem 1.3rem 1.4rem;
  flex: 1; display: flex; flex-direction: column;
}
.game-card-name {
  font-family: "Exo 2", system-ui, sans-serif;
  font-size: 1.2rem; font-weight: 700;
  color: var(--text); margin: 0 0 .45rem;
}
.game-card-desc {
  color: var(--text-muted);
  font-size: .9rem; line-height: 1.55;
  margin: 0 0 1.2rem; flex: 1;
}
.game-card-actions {
  display: flex; gap: .6rem;
}
.game-btn {
  flex: 1;
  padding: .65rem .7rem;
  border-radius: 9px;
  font-size: .82rem; font-weight: 700;
  cursor: pointer; text-align: center;
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .1s;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
}
.game-btn:active { transform: scale(.97); }
.game-btn-solo {
  background: rgba(79,127,255,.1);
  border: 1px solid rgba(79,127,255,.35);
  color: #9ab8ff;
}
.game-btn-solo:hover { background: rgba(79,127,255,.22); border-color: rgba(79,127,255,.6); color: #c0d4ff; }
.game-btn-invite {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border: 1px solid transparent;
  color: #1a0a00;
}
.game-btn-invite:hover { background: linear-gradient(135deg, #fcd34d, #fbbf24); }

/* ── How invite works ───────────────────────────────────────────── */
.games-how {
  padding: clamp(3rem, 6vw, 5rem) 0;
  border-top: 1px solid rgba(139,127,255,.15);
}
.games-how-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  position: relative;
  margin-top: 2.5rem;
}
.games-how-steps::before {
  content: '';
  position: absolute;
  top: 28px; left: calc(16.67% + 1.5rem); right: calc(16.67% + 1.5rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,127,255,.4) 30%, rgba(139,127,255,.4) 70%, transparent);
  pointer-events: none;
}
@media (max-width: 700px) {
  .games-how-steps { grid-template-columns: 1fr; }
  .games-how-steps::before { display: none; }
}
.games-how-step {
  text-align: center;
  padding: 1.6rem 1.2rem;
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(61,61,133,.35), rgba(20,22,42,.5));
  border: 1px solid rgba(139,127,255,.18);
}
.games-how-step-num {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f7fff, #8b7fff);
  color: #fff;
  font-family: "Exo 2", system-ui, sans-serif;
  font-size: 1.1rem; font-weight: 700;
  display: grid; place-items: center;
  margin: 0 auto 1rem;
}
.games-how-step h4 {
  font-family: "Exo 2", system-ui, sans-serif;
  font-size: 1.1rem; margin: 0 0 .5rem; color: var(--text);
}
.games-how-step p { color: var(--text-muted); font-size: .9rem; line-height: 1.55; margin: 0; }

/* ── Final CTA ──────────────────────────────────────────────────── */
.games-final {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
}
.games-final-card {
  position: relative; overflow: hidden;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 5vw, 3.5rem);
  border-radius: 26px;
  background:
    radial-gradient(800px 400px at 80% 0%, rgba(139,127,255,.25), transparent 65%),
    radial-gradient(600px 300px at 10% 100%, rgba(79,127,255,.25), transparent 65%),
    linear-gradient(165deg, rgba(61,61,133,.55), rgba(20,22,42,.7));
  border: 1px solid rgba(139,127,255,.32);
  text-align: center;
}
.games-final-card h2 {
  font-family: "Exo 2", system-ui, sans-serif;
  font-size: clamp(1.9rem, 3.8vw, 3rem);
  line-height: 1.15; font-weight: 700;
  margin: 0 0 .9rem; color: var(--text);
}
.games-final-card p {
  color: var(--text-muted); max-width: 36em; margin: 0 auto 2rem;
  font-size: clamp(.98rem, 1.3vw, 1.1rem); line-height: 1.65;
}
.games-final-ctas {
  display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center;
}
