/* Foxhole Darts — All Games marketing page (uses foxhole-home.css for header/tokens/buttons) */

.games-page-hero {
  padding: 64px 0 40px;
}
.games-page-hero .eyebrow { color: var(--accent); }
.games-page-hero h1 {
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 700;
  letter-spacing: -0.01em;
  max-width: 640px;
}
.games-page-hero p {
  margin-top: 16px;
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 620px;
}

/* ---------- Sticky preview block (hero + categories) ----------
   Mirrors DartsDev's Game Library: hero + category tabs stay in view
   while the card grid scrolls beneath them. 77px = the measured rendered
   height of .site-header (position:sticky; top:0) -- this block sticks
   directly below it, never over/under the real nav. Solid --paper
   background so scrolling cards never show through behind it. Desktop/
   tablet only -- see the mobile breakpoint below, where this reverts to
   static/in-flow so it never eats a phone's limited viewport. */
.games-sticky-block {
  position: sticky;
  top: 77px;
  z-index: 40;
  background: var(--paper);
  padding-top: 28px;
  padding-bottom: 12px;
  margin-bottom: 20px;
  /* A sticky element cannot have a permanent floating gap below it --
     once scrolled content reaches its bottom edge, that content is
     visible starting AT that edge, always, no matter how much padding
     is added (confirmed by direct measurement: padding-bottom only
     moves where the touching line is, never removes it). This soft
     downward fade is the standard fix every sticky filter/nav bar on
     the web uses instead -- it makes that unavoidable boundary read as
     an intentional layered edge rather than a hard, jarring cutoff. */
  box-shadow: 0 12px 16px -12px rgba(20, 26, 46, 0.18);
}

/* ---------- Category filter pills ---------- */
.cat-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 12px;
}
.cat-pill {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.cat-pill:hover { border-color: var(--ink-faint); color: var(--ink); }
.cat-pill.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- Feature panel (selected game) ----------
   Deliberately echoes DartsDev's own dark Game Library hero
   (.game-library-featured/.glf-bg/.glf-content) -- this IS the real
   product UI being previewed, on an otherwise bright marketing page.
   Text lives on the left over a dark-to-transparent scrim; the hero
   artwork shows through on the right. No Play button -- informational
   only, per the public preview's own rule. */
.game-feature {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: #0b0f1a;
  min-height: 280px;
}
.game-feature__bg {
  position: absolute;
  inset: 0;
}
.game-feature__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.game-feature__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(6, 9, 18, 0.96) 0%,
    rgba(6, 9, 18, 0.86) 30%,
    rgba(6, 9, 18, 0.4) 58%,
    rgba(6, 9, 18, 0.08) 78%,
    rgba(6, 9, 18, 0) 100%);
}
.game-feature__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 280px;
  max-width: 540px;
  padding: 32px 40px;
  box-sizing: border-box;
}
.game-feature__cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7fb2ff;
  margin-bottom: 10px;
}
.game-feature__title {
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: clamp(22px, 2.4vw, 32px);
  color: #f8f9ff;
  text-wrap: balance;
}
.game-feature__desc {
  margin-top: 14px;
  font-size: 15.5px;
  line-height: 1.65;
  color: rgba(244, 246, 251, 0.82);
  max-width: 480px;
}
.game-feature__desc[hidden] { display: none; }

/* ---------- Card library grid ---------- */
.games-library-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}
.games-library-head h2 {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 19px;
  color: var(--ink);
}
.games-library-count {
  font-size: 13.5px;
  color: var(--ink-faint);
}

/* Auto-fill instead of a fixed column count -- DartsDev's own Game
   Library grid (repeat(8, minmax(0,1fr)) across its full-width panel)
   produces roughly 150px cards; auto-fill at this target width
   reproduces that same density at any content width automatically
   (~10 columns at this page's ~1320px content max, fewer as the
   viewport narrows, no breakpoint bookkeeping needed) instead of
   locking to a column COUNT that got huge on a narrower content area. */
.games-lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 12px 10px;
  margin-bottom: 80px;
}
.lib-tile {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.lib-tile__art {
  /* ROOT CAUSE (2026-09-10): this is a <span> (inline by default) --
     CSS aspect-ratio has NO EFFECT on a non-sized inline box, so the
     2/3 ratio below was silently ignored and the box's real height came
     from inline content flow instead, rendering far taller than
     intended. DartsDev's own equivalent (.game-library-poster/
     .game-library-fallback in DartsDev/css/game-library.css) applies
     aspect-ratio directly to a `display:block` element for exactly this
     reason. This one `display:block` is the entire fix -- it was never
     the aspect-ratio VALUE (2/3 already matched DartsDev's real 202x303
     card art exactly), and it was never object-fit (cover was already
     correct) -- the box just wasn't the shape the ratio said it was. */
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(20, 26, 46, 0.04);
  aspect-ratio: 2 / 3;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.lib-tile__art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-tile:hover .lib-tile__art,
.lib-tile:focus-visible .lib-tile__art {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -10px rgba(20, 26, 46, 0.28);
}
.lib-tile:focus-visible .lib-tile__art { outline: 2px solid var(--accent); outline-offset: 2px; }
.lib-tile.is-selected .lib-tile__art {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-tint), 0 10px 20px -10px rgba(20, 26, 46, 0.28);
}
.lib-tile__label {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 980px) {
  .game-feature__content { padding: 26px 24px; max-width: 100%; }
}

/* ---------- Mobile: hero/categories go back to normal in-flow
   scrolling instead of sticky, so a large fixed block never eats a
   phone's limited viewport or fights the browser's own chrome. No vh
   units anywhere here -- the hero's height comes from its own content
   (min-height + padding), never the viewport. ---------- */
@media (max-width: 720px) {
  .games-sticky-block {
    position: static;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 24px;
    /* Not sticky here, so there's no scroll boundary for the shadow to
       soften -- it would just be a stray line under a normally-scrolling
       block. */
    box-shadow: none;
  }
  /* Smaller minmax floor than desktop's so 3 columns actually fit inside
     the narrower mobile .wrap padding, instead of collapsing to 2
     oversized cards -- still comfortably tappable (~100px wide, 2:3
     portrait card). */
  .games-lib-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }

  .game-feature { min-height: 0; }
  .game-feature__bg { position: relative; inset: auto; aspect-ratio: 16 / 9; }
  /* Content stacks BELOW the image on mobile (not overlaid on top of it),
     straight onto .game-feature's own dark background -- so the
     left-to-right legibility scrim no longer applies to anything and is
     simply turned off here rather than repurposed. */
  .game-feature__scrim { display: none; }
  .game-feature__content {
    position: relative;
    min-height: 0;
    max-width: 100%;
    padding: 20px 20px 24px;
  }

  /* Category pills scroll horizontally instead of wrapping to many rows */
  .cat-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .cat-pill { flex: 0 0 auto; white-space: nowrap; }
}
