/* ─────────────────────────────────────────────────────────────
   /games/<id> (game.html, <body class="gp-page">): the "Splash world"
   design the owner picked on 2026-11-17. Each game gets its own colour
   world from its icon (js/game-page.js sets the --gp-* shades); the hero
   is a rounded gradient blob with three phones of its screenshots fanned
   out of it and the app icon breaking out of the edge; waves, not hard
   bands, join the sections. Motion: phones rise in, then bob; pieces pop
   in, then float; the waves drift. All of it stops under
   prefers-reduced-motion. Everything here is gp-* or under #game-root.
   ───────────────────────────────────────────────────────────── */
body.gp-page { background: #fff; color: var(--site-ink); font: 400 17px/1.6 'Nunito', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.gp-page h1, .gp-page h2, .gp-page h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; }

.gp {
  --gp-deep: hsl(258, 55%, 24%); --gp-mid: hsl(258, 55%, 46%); --gp-soft: hsl(258, 55%, 74%);
  --gp-light: hsl(258, 60%, 95%); --gp-acc: hsl(258, 55%, 29%);
  --gp-ease: cubic-bezier(.2, .8, .2, 1); --gp-back: cubic-bezier(.34, 1.56, .64, 1);
}
.gp-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ─── Hero ──────────────────────────────────────────────────── */
.gp-hero { position: relative; padding: 140px 24px 0; background: linear-gradient(180deg, var(--gp-light) 0%, #fff 100%); overflow-x: clip; }
.gp-blob {
  position: relative; max-width: 1152px; min-height: 600px; margin: 0 auto; border-radius: 64px;
  background: radial-gradient(120% 120% at 70% 20%, var(--gp-soft) 0%, var(--gp-mid) 45%, var(--gp-deep) 100%);
}
.gp-blob::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(rgba(255, 255, 255, .14) 1.6px, transparent 1.7px) 0 0 / 26px 26px;
}
.gp-card {
  position: absolute; left: 56px; top: 50%; transform: translateY(-50%); z-index: 4; width: min(460px, calc(100% - 48px));
  background: #fff; border-radius: 32px; padding: 32px; box-shadow: 0 30px 60px -30px rgba(10, 6, 40, .6);
}
#game-root .gp-card .game-card-icon { width: 76px; height: 76px; border-radius: 22%; margin-bottom: 14px; box-shadow: 0 10px 20px -10px rgba(0, 0, 0, .4); }
#game-root .gp-card .game-badge {
  position: static; display: block; background: none; border: 0; padding: 0; margin-bottom: 6px;
  font-size: 14px; line-height: 20px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--gp-acc);
}
.gp-card h1 { font-size: 44px; line-height: 48px; margin: 0 0 10px; color: var(--site-ink); }
#game-root .gp-card .section-sub { font-size: 17px; line-height: 27px; color: var(--site-ink-2); margin: 0 0 22px; max-width: none; text-align: left; }
#game-root .gp-card .game-page-actions { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 12px; margin: 0; padding: 0; }
#game-root .gp-card .game-page-actions .btn { min-height: 52px; font-size: 16px; padding: 0 22px; }

.gp-phones { position: absolute; right: 40px; bottom: -40px; width: 560px; height: 640px; z-index: 3; }
.gp-phone { position: absolute; width: 222px; border-radius: 34px; background: #0D0A26; padding: 9px; box-shadow: 0 30px 60px -24px rgba(10, 6, 40, .55);
  transform: rotate(var(--r, 0deg)); animation: gp-rise .9s var(--gp-ease) both, gp-bob 6s ease-in-out 1s infinite; }
.gp-phone .gp-screen { position: relative; aspect-ratio: 9 / 19.5; border-radius: 26px; overflow: hidden; background: #000; }
.gp-phone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.gp-p1 { left: 0; bottom: 70px; --r: -9deg; animation-delay: .15s, 2.2s; }
.gp-p2 { left: 168px; bottom: 40px; width: 240px; z-index: 2; animation-delay: .05s, .8s; }
.gp-p3 { left: 336px; bottom: 80px; --r: 9deg; animation-delay: .25s, 3.6s; }
@keyframes gp-rise { from { opacity: 0; transform: translateY(60px) rotate(var(--r, 0deg)); } to { opacity: 1; transform: translateY(0) rotate(var(--r, 0deg)); } }
@keyframes gp-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }

/* pieces that break out of the blob's edge: the app icon and soft bubbles */
.gp-pop { position: absolute; z-index: 5; pointer-events: none; animation: gp-in .8s var(--gp-back) both, gp-float 5s ease-in-out infinite; }
.gp-pop img { width: 100%; height: auto; border-radius: 22%; filter: drop-shadow(0 18px 24px rgba(10, 6, 40, .35)); }
.gp-pop-icon { width: 128px; right: -28px; top: -44px; animation-delay: .5s, 1s; }
.gp-bubble { aspect-ratio: 1; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .55);
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .95) 0 8%, rgba(255, 255, 255, .4) 18%, rgba(255, 255, 255, .1) 55%, rgba(255, 255, 255, .3) 70%, rgba(255, 255, 255, .05) 72%); }
.gp-b1 { width: 84px; left: 44%; top: -30px; animation-delay: .7s, .4s; }
.gp-b2 { width: 56px; left: -18px; bottom: 64px; animation-delay: .8s, 1.8s; }
.gp-b3 { width: 40px; left: 7%; bottom: 28px; animation-delay: .9s, 2.4s; }
/* the overshoot lives on scale only (a back ease on a rotation wobbles past 0); the float starts and ends
   at rest so it takes over from the pop without a one-frame tilt */
@keyframes gp-in { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes gp-float { 0%, 100% { translate: 0 0; rotate: 0deg; } 25% { rotate: -3deg; } 50% { translate: 0 -16px; rotate: 0deg; } 75% { rotate: 3deg; } }

/* waves join the sections (the band itself: css/site.css .wave-band). One wave period (720 px) is a mask that repeats sideways on a band 720 px wider
   than the screen, which slides one period left and loops: it covers ANY width (a fixed 2880 px strip ended in
   a hard step past 1440 px, owner 2026-11-17). Transform-only, a CSS animation the E2E screenshots settle. */
.gp-wave, .gp-end { position: relative; height: 110px; overflow: hidden; }
.gp-wave { margin-top: -1px; color: var(--gp-light); }
.gp-end { background: var(--gp-light); color: var(--site-night); }
.gp-end .wave-band { animation-duration: 22s; animation-direction: reverse; }

/* ─── Features + screenshots ────────────────────────────────── */
.gp-sec { background: var(--gp-light); padding: 16px 0 64px; }
.gp-sec h2 { font-size: 40px; line-height: 46px; text-align: center; margin: 0 0 32px; color: var(--site-ink); }
.gp-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-bottom: 72px; }
#game-root .gp-feats .feature-card {
  position: relative; display: block; background: #fff; border: 0; border-radius: 28px; padding: 28px; color: var(--site-ink);
  backdrop-filter: none; box-shadow: 0 20px 40px -30px rgba(10, 6, 40, .5); transition: transform .35s var(--gp-ease);
}
#game-root .gp-feats .feature-card:hover { transform: translateY(-6px) rotate(-.5deg); }
.gp-badge { width: 60px; height: 60px; border-radius: 20px; display: grid; place-items: center; margin-bottom: 14px;
  background: var(--gp-light); color: var(--gp-acc); font: 700 28px var(--font-display); }
#game-root .gp-feats .feature-card h3 { font-size: 24px; line-height: 30px; margin: 0 0 6px; }
#game-root .gp-feats .feature-card p { font-size: 16px; line-height: 25px; margin: 0; color: var(--site-ink-2); }

#game-root .gp-sec .screenshots-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; max-width: none; padding: 24px 0 0; }
/* a screenshot phone sits in the flow (the hero phones are absolute) and does not rise or bob */
.gp-shot { position: relative; width: 230px; animation: none; transform: none; transition: transform .45s var(--gp-ease); }
.gp-shot:nth-child(3n+2) { transform: translateY(-24px); }
.gp-shot:hover { transform: translateY(-34px) rotate(-1.5deg); }
.gp-shot .gp-screen { aspect-ratio: 9 / 19.5; }
#game-root .gp-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; border: 0; border-radius: 0; }

@supports not (aspect-ratio: 1) {
  .gp-phone .gp-screen::before, .gp-shot .gp-screen::before { content: ""; display: block; padding-top: 216.67%; }
}

/* ─── Tablet / phone ────────────────────────────────────────── */
@media (max-width: 960px) {
  .gp-hero { padding: 128px 16px 0; } /* header 68 + the icon's 36 px break-out + air */
  .gp-blob { border-radius: 40px; min-height: 0; padding: 24px 20px 380px; }
  .gp-card { position: relative; left: auto; top: auto; transform: none; width: 100%; padding: 24px; }
  .gp-card h1 { font-size: 34px; line-height: 38px; }
  .gp-phones { left: 12px; right: 12px; bottom: -36px; width: auto; height: 400px; }
  .gp-phone { width: 128px; padding: 7px; border-radius: 26px; }
  .gp-phone .gp-screen { border-radius: 20px; }
  .gp-p1 { left: 0; }
  .gp-p2 { width: 146px; left: calc(50% - 73px); }
  .gp-p3 { left: auto; right: 0; }
  .gp-pop-icon { width: 84px; right: -6px; top: -36px; }
  .gp-b1 { top: -20px; }
  #game-root .gp-card .game-page-actions .btn { min-width: 172px; justify-content: center; }
  .gp-b2, .gp-b3 { display: none; }
  .gp-sec { padding-top: 48px; }
  .gp-sec h2 { font-size: 32px; line-height: 38px; }
  .gp-shot { width: calc(50% - 14px); max-width: 230px; }
  .gp-shot:nth-child(3n+2) { transform: none; }
}
/* last on purpose: the small-screen rules above set animation-name and would otherwise beat the earlier reduced-motion rule */
@media (prefers-reduced-motion: reduce) {
  .gp-phone { animation-name: soft-fade, soft-bob; animation-duration: .9s, 7s; }
  .gp-pop:not(.gp-bubble) { animation-name: soft-fade, soft-bob; animation-duration: .8s, 6s; }
  .wave-band, .gp-end .wave-band { animation-duration: 48s; }
}
