/* Страницы игр games/<id>/ — общий шаблон. Цвета игры задаёт :root в самой странице
   (--accent, --accent2, --ink, --bg, --panel, --line). */
:root {
  --text: #f6f1e7;
  --muted: #b3aac6;
  --radius: 14px;
  --pixel: "Press Start 2P", ui-monospace, monospace;
  --sans: Rubik, system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.gp {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; }
.ico { width: 1.15em; height: 1.15em; flex: none; }
.gp-wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding-inline: 16px; }
.gp-narrow { max-width: 760px; }

/* --- display-шрифт игры --- */
.display-pixel h2, .display-pixel .gp-tagline, .display-pixel .gp-final-t, .display-pixel .gp-ult,
.gp-brand span { font-family: var(--pixel); font-weight: 400; letter-spacing: 0; }
.display-pixel h2 { font-size: clamp(18px, 2.6vw, 26px); line-height: 1.45; }
.display-sans h2 { font-weight: 900; font-size: clamp(26px, 3.6vw, 40px); letter-spacing: -.02em; line-height: 1.1; }
h2 { margin: 0 0 18px; text-wrap: balance; }
h3 { margin: 0 0 6px; font-size: 19px; font-weight: 700; }

/* --- шапка --- */
.gp-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.gp-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.gp-brand img { image-rendering: pixelated; }
.gp-brand:hover img { animation: coin-spin .6s ease-out; }
@keyframes coin-spin { to { transform: rotateY(360deg); } }
.gp-brand span { font-size: 11px; line-height: 1.3; color: var(--text); }
.gp-brand b { color: #ffcc33; font-weight: 400; }
.gp-top .gp-btn { opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .2s, transform .2s; }
.gp-top.show-play .gp-btn { opacity: 1; transform: none; pointer-events: auto; }

/* --- кнопки --- */
.gp-btn {
  --btn: var(--accent);
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--btn); color: var(--ink);
  font: 900 17px/1 var(--sans); text-decoration: none; text-transform: uppercase; letter-spacing: .04em;
  padding: 16px 26px; border-radius: 12px;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--btn) 55%, #000), 0 14px 30px -10px color-mix(in srgb, var(--btn) 70%, transparent);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s;
}
.gp-btn:hover { filter: brightness(1.06); transform: translateY(-2px); box-shadow: 0 7px 0 color-mix(in srgb, var(--btn) 55%, #000), 0 18px 34px -10px color-mix(in srgb, var(--btn) 75%, transparent); }
.gp-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 color-mix(in srgb, var(--btn) 55%, #000); }
.gp-btn:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.gp-btn-xl { font-size: 20px; padding: 20px 34px; }
.gp-btn-sm { white-space: nowrap; font-size: 13px; padding: 10px 16px; border-radius: 10px; box-shadow: 0 3px 0 color-mix(in srgb, var(--btn) 55%, #000); }
.gp-btn-ghost { --btn: transparent; color: var(--text); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--text) 35%, transparent); }
.gp-btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--text); }

/* --- первый экран --- */
.gp-hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(92svh, 820px);
  display: flex; align-items: flex-end;
  margin-top: -57px; padding: 110px 0 56px;
}
.gp-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transform: scale(1.04); filter: brightness(.8) saturate(1.1); }
.gp-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 70%, transparent) 0%, transparent 30%, color-mix(in srgb, var(--bg) 55%, transparent) 62%, var(--bg) 100%),
    linear-gradient(90deg, color-mix(in srgb, var(--bg) 88%, transparent) 0%, color-mix(in srgb, var(--bg) 60%, transparent) 38%, transparent 70%);
}
.gp-hero-in { width: 100%; max-width: 1160px; margin: 0 auto; padding-inline: 16px; }
.gp-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.gp-crumbs a { text-decoration: none; } .gp-crumbs a:hover { color: var(--text); }
.gp-crumbs [aria-current] { color: var(--text); }
.gp-hero h1 { margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.gp-logo { width: min(560px, 88vw); height: auto; filter: drop-shadow(0 10px 24px rgba(0,0,0,.5)); animation: gp-pop .7s cubic-bezier(.2,1.4,.4,1) both; }
.gp-title { font: 900 clamp(48px, 8vw, 96px)/.95 var(--sans); letter-spacing: -.04em; color: var(--text); text-shadow: 0 6px 0 color-mix(in srgb, var(--accent) 60%, #000); }
.gp-tagline { font-size: clamp(14px, 2vw, 20px); line-height: 1.5; color: var(--accent); text-shadow: 0 3px 0 rgba(0,0,0,.55); }
.display-sans .gp-title { font: 900 clamp(48px, 8vw, 96px)/.95 var(--sans); letter-spacing: -.04em; color: var(--text); text-shadow: 0 6px 0 color-mix(in srgb, var(--accent) 60%, #000); }
.gp-tagline { font-weight: 900; font-size: clamp(20px, 2.6vw, 28px); }
.gp-lede { max-width: 620px; font-size: 18px; margin: 16px 0 26px; text-shadow: 0 1px 12px rgba(0,0,0,.7); }
.gp-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.gp-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 26px 0 0; }
.gp-chips li {
  font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px;
  background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(6px);
}
@keyframes gp-pop { from { opacity: 0; transform: scale(.82) rotate(-3deg); } }

/* --- секции --- */
.gp-sec { padding: 72px 0; }
.gp-intro { color: var(--muted); max-width: 640px; margin: -6px 0 28px; }
.gp-about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.gp-about p { margin: 0 0 14px; }
.gp-about p:first-of-type { font-size: 19px; }
.gp-feats, .gp-mode-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gp-feats li, .gp-mode-list li {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
}
.gp-feats .ico, .gp-mode-list .ico { width: 30px; height: 30px; color: var(--accent); margin-bottom: 10px; }
.gp-feats p, .gp-mode-list p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

.gp-trailer { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--panel) 70%, transparent) 30%, transparent); }
.gp-video {
  position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000;
  border: 3px solid var(--line); box-shadow: 0 30px 80px -30px color-mix(in srgb, var(--accent) 45%, transparent);
}
.gp-video video, .gp-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gp-note { color: var(--muted); font-size: 14px; margin: 12px 0 0; }

/* --- герои --- */
.gp-heroes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.gp-heroes li {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
  transition: transform .18s ease, border-color .18s ease;
}
.gp-heroes li:hover { transform: translateY(-3px) rotate(-.4deg); border-color: var(--accent); }
.gp-heroes img { width: 76px; height: 76px; border-radius: 10px; image-rendering: pixelated; background: #000; flex: none; border: 2px solid var(--line); }
.gp-heroes img.smooth { image-rendering: auto; object-fit: cover; }
.gp-heroes h3 { font-size: 18px; margin: 0 0 4px; }
.gp-ult { display: inline-block; font-size: 10px; color: var(--ink); background: var(--accent); padding: 4px 6px; border-radius: 4px; margin-bottom: 8px; text-transform: uppercase; }
.display-sans .gp-ult { font-size: 12px; font-weight: 700; }
.gp-heroes p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }

/* --- галерея --- */
.gp-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(560px, 85vw); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 4px max(16px, calc((100vw - 1160px) / 2 + 16px)) 20px;
  scroll-padding-inline: max(16px, calc((100vw - 1160px) / 2 + 16px));
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.gp-strip:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.gp-shot { margin: 0; scroll-snap-align: start; }
.gp-shot button { display: block; width: 100%; padding: 0; border: 0; background: #000; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; aspect-ratio: 16 / 9; }
.gp-shot img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gp-shot button:hover img { transform: scale(1.04); }
.gp-shot figcaption { font-size: 14px; color: var(--muted); padding: 10px 2px 0; line-height: 1.5; }
.gp-shot figcaption b { color: var(--text); margin-right: 4px; }

.gp-lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.gp-lightbox::backdrop { background: rgba(5, 3, 10, .9); }
.gp-lightbox[open] { display: flex; align-items: center; justify-content: center; }
.gp-lightbox img { max-width: 94vw; max-height: 86vh; border-radius: 10px; }
.gp-lightbox button { position: absolute; background: rgba(0,0,0,.6); color: #fff; border: 1px solid rgba(255,255,255,.25); width: 48px; height: 48px; border-radius: 50%; font-size: 24px; cursor: pointer; }
.gp-lb-prev { left: 12px; top: 50%; } .gp-lb-next { right: 12px; top: 50%; } .gp-lb-close { right: 12px; top: 12px; font-size: 18px !important; }

/* --- FAQ --- */
.gp-faq details { border-bottom: 1px solid var(--line); }
.gp-faq summary { cursor: pointer; padding: 18px 36px 18px 0; font-weight: 700; font-size: 18px; list-style: none; position: relative; }
.gp-faq summary::-webkit-details-marker { display: none; }
.gp-faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 26px; color: var(--accent); transition: transform .2s; }
.gp-faq details[open] summary::after { transform: rotate(45deg); }
.gp-faq details p { margin: 0 0 18px; color: var(--muted); }

/* --- финальный призыв --- */
.gp-final {
  padding: 80px 0; text-align: center;
  background:
    radial-gradient(60% 120% at 50% 100%, color-mix(in srgb, var(--accent2) 35%, transparent), transparent 70%),
    linear-gradient(180deg, transparent, color-mix(in srgb, var(--panel) 80%, transparent));
  border-block: 1px solid var(--line);
}
.gp-final-t { font-size: clamp(16px, 2.4vw, 24px); color: var(--accent); margin: 0 0 26px; line-height: 1.5; }
.display-sans .gp-final-t { font-weight: 900; font-size: clamp(24px, 3.4vw, 36px); }

/* --- другие игры --- */
.gp-more-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.gp-more-list a { display: block; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .18s, border-color .18s; }
.gp-more-list a:hover { transform: translateY(-3px); border-color: var(--a); }
.gp-more-list img { display: block; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; height: auto; }
.gp-more-list span { display: flex; flex-direction: column; padding: 10px 14px 12px; }
.gp-more-list small { color: var(--a); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }

.gp-foot { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; padding: 28px 16px 40px; color: var(--muted); font-size: 14px; }
.gp-foot a { text-decoration: none; } .gp-foot a:hover { color: var(--text); }

/* --- появление при прокрутке --- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .gp-about-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .gp-sec { padding: 52px 0; }
}
@media (max-width: 520px) {
  body.gp { font-size: 16px; }
  .gp-feats, .gp-mode-list { grid-template-columns: minmax(0, 1fr); }
  .gp-hero { padding-bottom: 40px; }
  .gp-lede { font-size: 16px; }
  .gp-btn-xl { font-size: 17px; padding: 17px 24px; }
  .gp-brand span { font-size: 9px; }
  .gp-heroes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gp-heroes li { flex-direction: column; gap: 10px; padding: 12px; }
  .gp-heroes img { width: 64px; height: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gp-logo, .gp-brand:hover img { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .gp-btn, .gp-heroes li, .gp-shot img, .gp-more-list a { transition: none; }
}

/* ================= подборки games/<slug>/ ================= */
.lp-hero { min-height: min(62svh, 560px); }
.lp-kicker { margin: 0 0 14px; font: 400 12px/1.6 var(--pixel); color: var(--accent); text-shadow: 0 2px 0 #000; }
.lp-h1 { margin: 0; max-width: 900px; font: 900 clamp(34px, 5.6vw, 68px)/1.02 var(--sans); letter-spacing: -.03em; text-shadow: 0 6px 30px #000a; text-wrap: balance; }
.lp-intro { padding-top: 40px; padding-bottom: 24px; }
.lp-intro p { font-size: 19px; margin: 0 0 16px; }
.lp-intro p:first-child { font-size: 21px; }
.lp-jump { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lp-jump a { display: inline-block; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); text-decoration: none; font-weight: 700; font-size: 14px; }
.lp-jump a:hover { border-color: var(--accent); }
.lp-sec p { margin: 0 0 14px; }
.lp-list { margin: 8px 0 0; display: grid; gap: 10px; }
.lp-list > div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.lp-list dt { font-weight: 900; font-size: 18px; margin-bottom: 4px; }
.lp-list dd { margin: 0; color: var(--muted); }
.lp-steps { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.lp-steps li { counter-increment: s; position: relative; padding: 12px 16px 12px 56px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.lp-steps li::before { content: counter(s); position: absolute; left: 14px; top: 10px; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--ink); font: 400 12px/28px var(--pixel); text-align: center; }
.lp-entry-list { display: grid; gap: 22px; }
.lp-entry {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 28px; align-items: center;
  padding: 22px; border-radius: 24px; border: 1px solid color-mix(in srgb, var(--a) 30%, var(--line));
  background: radial-gradient(70% 90% at 0% 50%, color-mix(in srgb, var(--a) 18%, transparent), transparent 70%), var(--panel);
  scroll-margin-top: 80px;
}
.lp-media { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 0 0 3px color-mix(in srgb, var(--a) 55%, transparent); }
.lp-media video, .lp-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp-n { position: absolute; left: 12px; top: 12px; width: 40px; height: 40px; border-radius: 10px; background: var(--a); color: #14121c; font: 400 16px/40px var(--pixel); text-align: center; box-shadow: 0 4px 0 #0007; }
.lp-best { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--a); }
.lp-body h3 { margin: 8px 0 10px; font-size: 32px; font-weight: 900; letter-spacing: -.02em; }
.lp-body h3 img { max-height: 110px; width: auto; max-width: 100%; display: block; filter: drop-shadow(0 6px 14px #0008); }
.lp-body > p { margin: 0 0 14px; color: var(--muted); line-height: 1.55; }
.lp-facts { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.lp-facts li { font-size: 13px; font-weight: 700; padding: 6px 11px; border-radius: 999px; background: #0004; border: 1px solid #ffffff1f; }
.spot-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.lp-more { padding-left: 20px; } .lp-more a { color: var(--accent); }
@media (max-width: 860px) {
  .lp-entry { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 14px; }
  .lp-intro p, .lp-intro p:first-child { font-size: 17px; }
}
.gp-top .gp-btn.gp-always { opacity: 1; transform: none; pointer-events: auto; }

/* ================= пресс-кит ================= */
.gp-press { padding: 40px 0; }
.gp-press-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 24px 28px; }
.gp-press-in h2 { margin-bottom: 8px; }
.gp-press-in p { margin: 0; color: var(--muted); max-width: 520px; }
.gp-press-in a:not(.gp-btn) { color: var(--accent); }
.press-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.press-item { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 24px; align-items: center;
  background: var(--panel); border: 1px solid color-mix(in srgb, var(--a) 30%, var(--line)); border-radius: 20px; padding: 18px; }
.press-item img { width: 100%; height: auto; border-radius: 12px; display: block; }
.press-item h3 { font-size: 28px; font-weight: 900; margin: 6px 0 8px; }
.press-item p { color: var(--muted); margin: 0 0 16px; }
.gp-intro a { color: var(--accent); }
@media (max-width: 700px) { .press-item { grid-template-columns: minmax(0, 1fr); } }
