/* ==========================================================================
   NOVA — games/games.css  (khusus halaman /games/)
   Dimuat SETELAH /style.css → semua token (warna, font, spacing) & komponen
   (btn, tag, kicker, value, faq, final-cta, footer, popup) diambil dari sana.
   File ini hanya berisi bagian yang tidak ada di homepage.
   Isi: 1. Nav state  2. Page hero  3. Spotlight  4. Filter bar  5. Game grid  6. Categories
   ========================================================================== */

/* 1. NAV STATE ------------------------------------------------------------- */
.primary-nav a[aria-current="page"] { color: var(--text); }
.primary-nav a[aria-current="page"]::after { transform: scaleX(1); }
.mobile-nav a[aria-current="page"] { color: var(--gold-hi); }

/* 2. PAGE HERO (lebih pendek dari hero homepage — ini halaman katalog) ------- */
.page-hero {
  position: relative; isolation: isolate; overflow-x: clip;
  padding-top: calc(var(--header-h) + var(--safe-t) + clamp(24px, 5vw, 56px));
  padding-bottom: clamp(48px, 7vw, 96px);
  border-bottom: 1px solid var(--line);
}
.page-hero-inner { display: grid; gap: clamp(36px, 5vw, 56px); align-items: center; }
.page-hero-copy { max-width: 640px; }
.page-hero .display { font-size: clamp(2.1rem, 1.2rem + 3vw, 3.8rem); }

.breadcrumb { margin-bottom: 22px; font-size: .88rem; color: var(--muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.breadcrumb li { display: inline-flex; align-items: center; gap: 10px; }
.breadcrumb li + li::before { content: ""; width: 6px; height: 6px; border-top: 1.5px solid var(--muted); border-right: 1.5px solid var(--muted); rotate: 45deg; opacity: .7; }
.breadcrumb a { display: inline-block; padding: 6px 0; color: var(--text-2); transition: color .25s; }
.breadcrumb a:hover { color: var(--gold-hi); }
.breadcrumb [aria-current="page"] { color: var(--gold); }

.hero-facts { display: flex; flex-wrap: wrap; gap: 0; margin-top: 30px; }
.hero-facts > div { display: flex; flex-direction: column-reverse; gap: 2px; padding: 4px 22px; border-left: 1px solid var(--line-2); }
.hero-facts > div:first-child { padding-left: 0; border-left: 0; }
.hero-facts dd { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-display); line-height: 1.15; }
.hero-facts dd span { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem); font-weight: 600; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.hero-facts dd small { font-family: var(--font-body); font-size: .85rem; color: var(--text-2); }
.hero-facts dt { font-size: .82rem; color: var(--muted); }
.page-hero .cta-group { margin-top: 30px; }
@media (max-width: 479px) {
  .hero-facts > div { padding-inline: 14px; }
  .page-hero .cta-group .btn { flex: 1 1 100%; }
}

/* 3. SPOTLIGHT ------------------------------------------------------------- */
.spotlight {
  position: relative; isolation: isolate;
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line-2); background: var(--surface-2);
  box-shadow: 0 40px 80px -36px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .1);
}
.spotlight-media { aspect-ratio: 4 / 5; }               /* mobile: tegak supaya teks muat di atas gambar */
.spotlight-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.spotlight:hover .spotlight-media img { transform: scale(1.04); }
.spotlight::after { /* scrim: hanya di area teks */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, transparent 35%, rgba(5, 5, 9, .55) 60%, rgba(5, 5, 9, .92) 100%);
}
.spotlight-meta { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: clamp(18px, 3vw, 28px); display: grid; gap: 10px; justify-items: start; }
.spotlight-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.spotlight-tags .tag { display: inline-flex; align-items: center; gap: 6px; }
.spotlight-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); line-height: 1.25; }
.spotlight-desc { color: var(--text-2); max-width: 30em; font-size: .97rem; }
.spotlight .btn { margin-top: 6px; }
.spotlight-chip {
  position: absolute; z-index: 3; top: 16px; right: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 12px; font-size: .8rem; white-space: nowrap;
  animation: float 6s ease-in-out infinite;
}
.spotlight-chip svg { color: var(--gold); }
@media (min-width: 600px) { .spotlight-media { aspect-ratio: 3 / 2; } } /* = rasio asli game-01.webp */
@media (min-width: 1024px) {
  .page-hero-inner { grid-template-columns: 1fr 1.05fr; }
  .spotlight { rotate: 1.2deg; transition: rotate .6s var(--ease-out); }
  .spotlight:hover { rotate: 0deg; }
}

/* 4. FILTER BAR (sticky di bawah header) ------------------------------------ */
.all-games { padding-top: clamp(64px, 8vw, 112px); }
.all-games-head { display: grid; gap: 14px; margin-bottom: 28px; }
.all-games-head .body-lg { max-width: 26em; }
@media (min-width: 1024px) {
  .all-games-head { grid-template-columns: 1fr 1fr; align-items: end; }
  .all-games-head .body-lg { justify-self: end; }
}

.filter-bar { display: none; }
.has-filter .filter-bar {
  display: block;
  position: sticky; top: calc(var(--header-h) + var(--safe-t)); z-index: 20;
  margin-bottom: 28px; padding-block: 12px;
  background: rgba(7, 7, 11, .78);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  border-block: 1px solid var(--line);
}
.filter-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.filters {
  display: flex; gap: 8px; min-width: 0; max-width: 100%;
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
  padding: 3px; margin: -3px;                           /* ruang untuk outline focus */
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none; scroll-snap-align: start;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--text-2); font-weight: 500; font-size: .94rem;
  transition: color .25s, background-color .3s, border-color .3s;
}
.chip:hover { color: var(--text); border-color: rgba(227, 189, 116, .45); }
.chip[aria-pressed="true"] { color: #1b1408; background: var(--gold); border-color: var(--gold); }
.chip[hidden] { display: none; }
.chip-count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; font-size: .75rem; font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, .08); color: var(--text-2);
}
.chip[aria-pressed="true"] .chip-count { background: rgba(27, 20, 8, .16); color: #1b1408; }
.results-count { font-size: .88rem; color: var(--muted); white-space: nowrap; }
.results-count strong { color: var(--text); font-weight: 600; }
@media (max-width: 767px) {
  .has-filter .filter-bar { padding-block: 10px; }
  .filter-inner { flex-wrap: nowrap; }
  .results-count { display: none; }                     /* mobile: ruang untuk chip; jumlah ada di badge */
}

/* 5. GAME GRID ------------------------------------------------------------- */
.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 768px) { .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1280px) { .game-grid { gap: 24px; } }

.gcard {
  position: relative; display: flex; flex-direction: column;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--surface);
  transition: transform .5s var(--ease-out), border-color .3s, box-shadow .5s var(--ease-out);
}
.gcard[hidden] { display: none; }                      /* class display:flex menimpa [hidden] bawaan */
.gcard:hover { transform: translateY(-4px); border-color: rgba(227, 189, 116, .45); box-shadow: 0 28px 50px -30px rgba(0, 0, 0, .9); }
.gcard:focus-within { border-color: rgba(227, 189, 116, .6); }
.gcard-media { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--surface-2); }
.gcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.gcard:hover .gcard-media img { transform: scale(1.06); }
.gcard-body { flex: 1; display: grid; grid-template-rows: auto auto 1fr auto; gap: 6px; justify-items: start; padding: 14px 14px 10px; }
.gcard-body h3 { font-family: var(--font-display); font-size: clamp(1.02rem, .95rem + .4vw, 1.25rem); line-height: 1.35; }
.gcard-body p { font-size: .86rem; line-height: 1.65; color: var(--text-2); }
.gcard-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px;
  font-size: .9rem; font-weight: 600; color: var(--gold-hi);
}
.gcard-link::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* seluruh kartu bisa diklik */
.gcard-link:focus-visible { outline: none; }
.gcard-link:focus-visible::after { outline: 2px solid var(--gold); outline-offset: -2px; border-radius: var(--radius); }
.gcard-link svg { transition: transform .3s var(--ease); }
.gcard:hover .gcard-link svg { transform: translateX(4px); }
@media (min-width: 768px) { .gcard-body { padding: 18px 18px 12px; gap: 8px; } .gcard-body p { font-size: .92rem; } }
.gcard.is-entering { animation: panelIn .5s var(--ease-out); }   /* keyframe dari style.css */

/* 6. CATEGORIES ------------------------------------------------------------ */
.cats { border-top: 1px solid var(--line); background: radial-gradient(60% 60% at 0% 40%, rgba(117, 102, 255, .07), transparent 70%), var(--bg); }
.cats-head { margin-bottom: 40px; }
.cats-head .h2 { max-width: 14em; }
.cat-list { display: grid; gap: 36px; }
.cat { display: grid; gap: 18px; align-content: start; }
.cat-art { position: relative; overflow: hidden; aspect-ratio: 16 / 10; border-radius: var(--radius-lg); border: 1px solid var(--line-2); background: var(--surface-2); }
.cat-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease-out); }
.cat:hover .cat-art img { transform: scale(1.04); }
.cat-art::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, transparent 55%, rgba(5, 5, 9, .72) 100%); }
.cat-index {
  position: absolute; z-index: 2; left: 20px; bottom: 6px;
  font-family: var(--font-display); font-size: clamp(3rem, 6vw, 4.6rem); line-height: 1; color: rgba(255, 255, 255, .9);
  mix-blend-mode: overlay;
}
.cat-body { display: grid; gap: 10px; justify-items: start; }
.cat-body h3 { font-family: var(--font-display); font-size: clamp(1.35rem, 1.1rem + .9vw, 1.8rem); line-height: 1.35; }
.cat-body p { color: var(--text-2); max-width: 32em; }
.cat-body .text-link { margin-top: 4px; }
@media (min-width: 768px) {
  .cat-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 28px; }
  .cat:nth-child(even) { margin-top: 56px; }            /* ritme zig-zag, bukan grid kartu kaku */
}
@media (min-width: 1280px) { .cat-list { column-gap: 48px; } }
