/* games.html — search + genre filter, minimal photo game cards (light text in both themes) and CTA. */

/* hero pill: the price sits inside <strong>, so undo the label style .spec-pill-item span applies */
.spec-pill-item strong span { display: inline; font-size: inherit; color: inherit; }
.spec-pill-item strong small { font-size: 11.5px; color: var(--text-muted); font-weight: 500; }

/* ------------------------------------------------------------------ toolbar */
.gm-toolbar { display: flex; flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 28px; }
.gm-search {
  position: relative; display: flex; align-items: center; gap: 12px;
  height: 58px; padding: 0 16px 0 20px;
  background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  cursor: text; transition: border-color .2s ease, box-shadow .2s ease;
}
.gm-search:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border-strong)); }
.gm-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent);
}
.gm-search-ico, .gm-search > svg { width: 20px; height: 20px; color: var(--text-dim); flex-shrink: 0; }
.gm-search:focus-within > svg { color: var(--primary); }
.gm-search-input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
  color: var(--text); font: inherit; font-size: 16px; font-weight: 500;
}
.gm-search-input::placeholder { color: var(--text-dim); }
.gm-search-input::-webkit-search-cancel-button { cursor: pointer; }
.gm-search-input:focus-visible { outline: none; } /* the whole field shows the focus ring */
.gm-search-key {
  font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; color: var(--text-dim);
  min-width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong); border-radius: 6px; background: var(--bg-subtle);
}
.gm-search:focus-within .gm-search-key { display: none; }

.gm-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.gm-filter-btn {
  background: transparent; border: 1px solid var(--border); color: var(--text-muted);
  font: inherit; font-size: 13px; font-weight: 700; padding: 7px 16px; border-radius: var(--radius-pill);
  cursor: pointer; transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
.gm-filter-btn:hover { color: var(--text); border-color: var(--border-strong); }
.gm-filter-btn.is-active { color: #fff; background: var(--primary); border-color: var(--primary); }

/* ------------------------------------------------------------------- card grid
   Minimal photo cards: image, genre, name, price, one arrow CTA. Uniform 4/3/2/1 grid. */
.gm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (min-width: 1280px) { .gm-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1024px) { .gm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .gm-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; } }

.gm-card {
  --delay: calc(var(--d, 0) * 70ms);
  position: relative; isolation: isolate; overflow: hidden; min-width: 0;
  border-radius: 18px;
  transition:
    opacity .6s ease var(--delay),
    translate .8s cubic-bezier(.16, 1, .3, 1) var(--delay),
    scale .3s ease,
    border-color .5s ease, box-shadow .5s ease;
}
.gm-card[hidden] { display: none; }
.gm-card-media { overflow: hidden; }
.gm-card-media img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.4s cubic-bezier(.16, 1, .3, 1);
}
.gm-card:hover .gm-card-media img, .gm-card:focus-within .gm-card-media img { transform: scale(1.05); }

/* whole card is clickable; the CTA sits above the stretched link */
.gm-card-link { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.gm-card-body { position: relative; z-index: 3; pointer-events: none; }
.gm-card-body a { pointer-events: auto; }

.gm-genre {
  display: block; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; margin-bottom: 8px;
}
.gm-card-body h3 {
  font-family: 'Cabinet Grotesk', 'Plus Jakarta Sans', sans-serif; font-weight: 800; line-height: 1.05;
  letter-spacing: -.02em; margin: 0;
}
.gm-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 16px; }
.gm-price { white-space: nowrap; line-height: 1; }
.gm-price small { font-size: 12px; font-weight: 500; }
.gm-price strong { font-family: 'Cabinet Grotesk', sans-serif; font-size: 21px; font-weight: 800; margin: 0 2px; letter-spacing: -.01em; }

/* one discreet CTA: a round arrow button (the label is read by screen readers) */
.gm-go {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid; transition: background-color .35s ease, border-color .35s ease, color .35s ease;
}
.gm-go-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gm-go-ico { position: relative; width: 16px; height: 16px; overflow: hidden; display: block; }
.gm-go-ico svg { position: absolute; inset: 0; width: 16px; height: 16px; transition: transform .45s cubic-bezier(.16, 1, .3, 1); }
.gm-go-ico svg:last-child { transform: translateX(-140%); }
.gm-card:hover .gm-go-ico svg:first-child, .gm-card:focus-within .gm-go-ico svg:first-child { transform: translateX(140%); }
.gm-card:hover .gm-go-ico svg:last-child, .gm-card:focus-within .gm-go-ico svg:last-child { transform: none; }
.gm-card:hover .gm-go, .gm-card:focus-within .gm-go { background: var(--primary); border-color: var(--primary); color: #fff; }

.gm-ribbon {
  position: absolute; top: 14px; right: 14px; z-index: 3; pointer-events: none;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: #dbeafe; padding: 5px 9px; border-radius: 999px; line-height: 1;
  background: rgba(6, 9, 19, .55); border: 1px solid rgba(147, 197, 253, .35);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}

/* ---------- text over the bottom of a tall photo (chosen over a photo-banner + info-panel variant) */
.gm-v-a .gm-card {
  aspect-ratio: 4 / 5; display: flex; flex-direction: column; justify-content: flex-end;
  background: #0a0f1c; border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 20px 40px -28px rgba(0, 0, 0, .8);
}
.gm-v-a .gm-card-media { position: absolute; inset: 0; z-index: -1; }
.gm-v-a .gm-card-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 9, 19, .35) 0%, rgba(6, 9, 19, 0) 20%),
    linear-gradient(180deg, rgba(6, 9, 19, 0) 34%, rgba(6, 9, 19, .7) 58%, rgba(6, 9, 19, .97) 100%);
}
.gm-v-a .gm-card-media img { filter: saturate(.9); }
.gm-v-a .gm-card-body { padding: 24px; }
.gm-v-a .gm-genre { color: rgba(203, 213, 225, .78); }
.gm-v-a .gm-card-body h3 { font-size: 30px; color: #fff; text-shadow: 0 2px 16px rgba(0, 0, 0, .4); }
.gm-v-a .gm-foot { border-top: 1px solid rgba(255, 255, 255, .12); }
.gm-v-a .gm-price small { color: rgba(203, 213, 225, .72); }
.gm-v-a .gm-price strong { color: #fff; }
.gm-v-a .gm-go { color: #fff; border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .06); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.gm-v-a .gm-card:hover, .gm-v-a .gm-card:focus-within {
  border-color: color-mix(in srgb, var(--primary) 65%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 26px 50px -28px rgba(0, 0, 0, .9);
}
html[data-theme="light"] .gm-v-a .gm-card { border-color: rgba(15, 23, 42, .08); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 20px 40px -26px rgba(15, 23, 42, .45); }
html[data-theme="light"] .gm-v-a .gm-card:hover { border-color: color-mix(in srgb, var(--primary) 70%, transparent); }

/* phone: one card per row, a less tall photo */
@media (max-width: 640px) {
  .gm-v-a .gm-card { aspect-ratio: 1 / 1; }
  .gm-v-a .gm-card-body { padding: 20px; }
}

/* entrance (games.js adds .gm-anim, then .is-in per card as it scrolls into view) */
.gm-anim .gm-card:not(.is-in) { opacity: 0; translate: 0 24px; }
.gm-grid.is-filtering .gm-card { --delay: calc(var(--d, 0) * 40ms); }
/* filtering: cards fade/scale out before they are hidden */
.gm-card.is-out { opacity: 0; scale: .96; --delay: 0s; }
/* animations run for everyone, like the rest of the site (common.js: Enix.reducedMotion = false) */

/* -------------------------------------------------------------------- empty state */
.gm-empty {
  text-align: center; padding: 48px 24px; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg);
  background: var(--card);
}
.gm-empty[hidden] { display: none; }
.gm-empty-ico {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent);
}
.gm-empty-ico svg { width: 24px; height: 24px; }
.gm-empty h3 { font-size: 20px; font-weight: 800; color: var(--text); margin: 0 0 6px; }
.gm-empty p { color: var(--text-muted); font-size: 14.5px; line-height: 1.6; max-width: 460px; margin: 0 auto 20px; }
.gm-empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }

/* ------------------------------------------------------------------------- CTA */
.gm-cta-section { padding-top: 0; }
.gm-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap;
  padding: 36px 40px; border-radius: var(--radius-lg); border: 1px solid var(--border);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 60%),
    var(--card);
}
.gm-cta-text { min-width: 0; flex: 1 1 380px; }
.gm-cta h2 { font-size: 30px; font-weight: 800; margin: 0 0 8px; color: var(--text); }
.gm-cta p { color: var(--text-muted); font-size: 15px; line-height: 1.6; margin: 0; }
.gm-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 600px) {
  .vps-hero-title { font-size: 34px; }
  .curved-highlight { white-space: normal; }
  .gm-search { height: 52px; }
  .gm-search-key { display: none; }
  .gm-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .gm-filter::-webkit-scrollbar { display: none; }
  .gm-filter-btn { flex-shrink: 0; }
  .gm-cta { padding: 28px 22px; }
  .gm-cta h2 { font-size: 24px; }
  .gm-cta-actions, .gm-cta-actions .btn { width: 100%; }
  .gm-cta-actions .btn { justify-content: center; }
}
