/* ===== /games/: the games index. Relies on styles.css for tokens, .nav, .footer, .reveal and Lenis. ===== */

.gx{background:#070708;color:#fff}
.gx ::selection{background:#fff;color:#070708}

/* same content edges as the nav bar: 72px in from the window at 1440, 1360px wide at most */
.gx-wrap{max-width:calc(var(--maxw) + 2 * var(--pad));margin:0 auto;padding-inline:var(--pad)}

.gx-skip{position:absolute;left:16px;top:-60px;z-index:80;padding:10px 16px;border-radius:999px;background:#fff;color:#070708;font-weight:600;font-size:14px;transition:top .25s var(--ease)}
.gx-skip:focus{top:16px}

/* the nav marks where you are */
.gx .nav-links a[aria-current="page"]{opacity:1;text-decoration:underline;text-decoration-thickness:1.5px;text-underline-offset:7px}
.gx .nav-menu a[aria-current="page"] span{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:8px}

/* ---------- first screen: a short title, then the two games fill what is left ---------- */
.gx-first{min-height:100svh;display:flex;flex-direction:column}
.gx-hero{padding:clamp(86px,11vh,118px) 0 clamp(16px,2.2vh,26px)}
.gx-hero-in{display:grid;grid-template-columns:1fr 1fr;column-gap:clamp(12px,1.2vw,18px);align-items:end}
.gx-title{font-weight:800;letter-spacing:-.045em;line-height:.9;font-size:clamp(44px,4.4vw,64px);margin:0 0 0 -.04em}
.gx-title .gx-ch{display:inline-block;will-change:transform}

.gx-games{flex:1 1 auto;display:flex;gap:clamp(12px,1.2vw,18px);width:100%;min-height:440px;max-height:920px;padding-bottom:clamp(14px,2.4vh,28px)}
.gx-card{position:relative;flex:1 1 0;min-width:0;border-radius:clamp(22px,2vw,30px);overflow:hidden;isolation:isolate;background:#0c1416;
  container:gxcard / size;cursor:pointer;-webkit-mask-image:-webkit-radial-gradient(white,black)}
.gx-card::after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 0 1px rgba(255,255,255,.09);pointer-events:none;z-index:2}
.gx-gj{background:#0e1b4d}

.gx-art{position:absolute;inset:0;z-index:-3}
.gx-art img{width:100%;height:100%;object-fit:cover;transition:transform 1.2s var(--ease),filter 1s var(--ease)}
.gx-tqb .gx-art img{object-position:50% 50%;filter:saturate(.9) brightness(.86)}
.gx-gj .gx-art img{object-position:50% 38%}
.gx-card:hover .gx-art img{transform:scale(1.03)}
.gx-tqb:hover .gx-art img{filter:saturate(1) brightness(.96)}

.gx-grade{position:absolute;inset:0;z-index:-1;pointer-events:none}
.gx-tqb .gx-grade{background:
  linear-gradient(180deg,rgba(3,9,11,.5) 0%,rgba(3,9,11,0) 24%,rgba(3,9,11,.06) 42%,rgba(3,9,11,.88) 78%,rgba(3,9,11,.96) 100%),
  radial-gradient(120% 70% at 50% 0%,rgba(122,206,198,.10),transparent 60%)}
.gx-gj .gx-grade{background:
  linear-gradient(180deg,rgba(9,16,48,.38) 0%,rgba(9,16,48,0) 22%,rgba(9,16,48,0) 40%,rgba(9,16,48,.84) 72%,rgba(9,16,48,.96) 100%)}

/* Gem Jam: a real board from the game, and Pip waving beside it. Sized from the card, so a narrow card shrinks them. */
.gx-play{position:absolute;inset:0;z-index:-1;pointer-events:none}
.gx-board{position:absolute;right:7cqw;top:7cqh;height:min(52cqh,50cqw);width:auto;transform:rotate(5deg);transform-origin:50% 60%;
  filter:drop-shadow(0 26px 30px rgba(4,8,30,.55)) drop-shadow(0 0 22px rgba(255,214,120,.18))}
.gx-pip{position:absolute;right:calc(7cqw + min(52cqh,50cqw) * .58);top:calc(7cqh + min(52cqh,50cqw) * .22);height:min(29cqh,27cqw);width:auto;
  filter:drop-shadow(0 18px 20px rgba(4,8,30,.5))}

/* a card squeezed by its neighbour's hover keeps the board clear of the copy */
@container gxcard (max-width:560px){
  .gx-board{height:min(44cqh,40cqw)}
  .gx-pip{right:calc(7cqw + min(44cqh,40cqw) * .58);top:calc(7cqh + min(44cqh,40cqw) * .3);height:min(26cqh,24cqw)}
}

/* short laptop screens: keep the board and Pip clear of the copy */
@container gxcard (max-height:640px){
  .gx-board{height:min(44cqh,44cqw)}
  .gx-pip{right:calc(7cqw + min(44cqh,44cqw) * .58);top:calc(7cqh + min(44cqh,44cqw) * .22);height:min(25cqh,24cqw)}
}

/* card copy */
.gx-body{position:absolute;left:0;right:0;bottom:0;padding:clamp(24px,3vw,48px);display:flex;flex-direction:column;align-items:flex-start}
.gx-genre{font-size:clamp(14px,1vw,16px);font-weight:600;letter-spacing:.005em;margin:0 0 clamp(12px,1.6vh,18px);text-shadow:0 1px 2px rgba(6,10,30,.9),0 0 14px rgba(6,10,30,.8)}
.gx-tqb .gx-genre{color:#9fdcd5}
.gx-gj .gx-genre{color:#ffe08a}
.gx-name{margin:0;line-height:0;height:clamp(64px,min(6.8vw,24cqw),106px);display:flex;align-items:flex-end}
.gx-name img{display:block;height:auto}
.gx-name-tqb img{height:80%;width:auto}
.gx-name-gj img{height:100%;width:auto;filter:drop-shadow(0 10px 18px rgba(0,0,0,.45));margin-left:-6px}
.gx-pitch{margin:clamp(14px,2vh,22px) 0 0;min-height:4.5em;max-width:min(36ch,88cqw);color:rgba(255,255,255,.86);font-size:clamp(15.5px,1.12vw,18px);line-height:1.5;text-wrap:pretty}
.gx-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px 14px;margin-top:clamp(18px,2.6vh,26px)}
.gx-status{margin:0;font-size:clamp(13px,.9vw,15px);font-weight:500;letter-spacing:-.005em;color:rgba(255,255,255,.62)}
.gx-status-under{margin-top:12px}
.gx-status a{color:#fff;text-decoration:underline;text-decoration-color:rgba(255,255,255,.4);text-underline-offset:3px;transition:text-decoration-color .25s}
.gx-status a:hover{text-decoration-color:#fff}
.gx-cta{display:inline-flex;align-items:center;font-weight:600;font-size:15px;letter-spacing:-.01em;
  padding:14px 22px;border-radius:999px;background:#fff;color:#070708;transition:background .35s var(--ease),transform .5s var(--spring)}
.gx-card:hover .gx-cta{transform:translateY(-2px)}
.gx-tqb .gx-cta{background:#dff3f0}
.gx-gj .gx-cta{background:linear-gradient(180deg,#ffe9a6,#f3c552);color:#3a2405;box-shadow:inset 0 -3px 0 rgba(154,106,28,.55),0 8px 20px rgba(0,0,0,.25)}
.gx-store{display:inline-block;line-height:0;border-radius:9px;transition:transform .5s var(--spring)}
.gx-store img{height:48px;width:auto}
.gx-store:hover{transform:translateY(-2px)}
.gx-play-web{display:inline-flex;align-items:center;font-weight:600;font-size:15px;letter-spacing:-.01em;padding:13px 21px;border-radius:999px;
  color:#fff;background:rgba(255,255,255,.1);box-shadow:inset 0 0 0 1px rgba(255,255,255,.34);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
  transition:background .35s var(--ease),transform .5s var(--spring)}
.gx-play-web:hover{background:rgba(255,255,255,.2);transform:translateY(-2px)}
.gx-play-web:focus-visible{outline:2px solid #fff;outline-offset:4px;border-radius:999px}
/* a computer plays in the browser today; a phone gets the store badge */
.gx-only-desk{display:none}
@media(hover:hover) and (min-width:900px){
  .gx-only-desk{display:inline-flex}
  p.gx-only-desk{display:block}
  .gx-only-touch{display:none}
}
.gx-cta:focus-visible,.gx-store:focus-visible{outline:2px solid #fff;outline-offset:4px}
.gx-cta:focus-visible{border-radius:999px}

/* ---------- studio note ---------- */
.gx-studio{padding:clamp(96px,15vh,168px) 0 clamp(96px,14vh,160px)}
.gx-studio-in{display:grid;grid-template-columns:1fr 1fr;column-gap:clamp(12px,1.2vw,18px);align-items:start}
.gx-studio-h{font-weight:400;letter-spacing:-.035em;line-height:1;font-size:clamp(34px,3.6vw,52px);margin:0;text-wrap:balance}
.gx-studio-copy{padding-left:clamp(24px,3vw,48px)}
.gx-studio-copy p{color:rgba(255,255,255,.72);font-size:clamp(16px,1.25vw,19px);line-height:1.6;max-width:44ch;margin:0}
.gx-links{list-style:none;margin-top:clamp(26px,4vh,40px);border-top:1px solid var(--line-d)}
.gx-links li{border-bottom:1px solid var(--line-d)}
.gx-links a{display:block;padding:18px 0;font-size:clamp(17px,1.4vw,21px);letter-spacing:-.015em;transition:opacity .25s,padding .5s var(--ease)}
.gx-links a:hover{opacity:.7;padding-left:6px}

/* the footer sits on the same black as the page */
.gx .footer{background:#070708;border-top:1px solid rgba(255,255,255,.08)}
.gx .footer .wrap{max-width:calc(var(--maxw) + 2 * var(--pad))}

/* ---------- responsive ---------- */
@media(min-width:900px) and (max-width:1180px){
  .gx-status-under{min-height:2.6em;text-wrap:balance}
  .gx-actions{gap:10px}
  .gx-cta,.gx-play-web{padding:12px 16px;font-size:14px}
}
@media(max-width:899px){
  .gx-first{min-height:0}
  .gx-hero-in,.gx-studio-in{grid-template-columns:1fr;row-gap:16px}
  .gx-studio-copy{padding-left:0}
  .gx-games{flex-direction:column;max-height:none;min-height:0;gap:14px}
  .gx-card{flex:none;height:max(600px,88svh);max-height:840px}
  .gx-board{right:50%;top:5cqh;height:min(40cqh,62cqw);transform:translateX(50%) rotate(4deg)}
  .gx-pip{right:calc(50% + min(40cqh,62cqw) * .2);top:calc(5cqh + min(40cqh,62cqw) * .37);height:min(24cqh,36cqw)}
  .gx-gj .gx-grade{background:linear-gradient(180deg,rgba(9,16,48,.3) 0%,rgba(9,16,48,0) 20%,rgba(9,16,48,.55) 46%,rgba(9,16,48,.92) 62%,rgba(9,16,48,.97) 100%)}
}
@media(max-width:480px){
  .gx-body{padding:22px}
  .gx-actions{gap:10px}
  .gx-cta{padding:13px 16px}
  .gx-store img{height:40px}
  .gx-board{height:min(36cqh,56cqw)}
  .gx-pip{right:calc(50% + min(36cqh,56cqw) * .2);top:calc(5cqh + min(36cqh,56cqw) * .37);height:min(22cqh,32cqw)}
}

.gx .nav:not(.menu-open):not(.menu-closing) .nav-menu{visibility:hidden}

/* ---------- motion: the site's gentle fade-up only (styles.css .load) ---------- */
@media(prefers-reduced-motion:reduce){
  .gx-card,.gx-art img{transition:none}
  .gx-card:hover .gx-art img{transform:none}
}
