@font-face {
  font-family: "Steppe Pixel";
  src: url("/fonts/steppe-pixel.woff2") format("woff2");
  font-display: swap;
}

:root {
  --night: #0b0d16;
  --night-2: #12141f;
  --panel: #171a27;
  --line: #2b2f42;
  --snow: #e9e9ef;
  --frost: #a5a8b8;
  --lantern: #f2a144;
  --ember: #c9542c;
  --pixel: "Steppe Pixel", ui-monospace, monospace;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--night); }
body {
  margin: 0;
  background: var(--night);
  color: var(--snow);
  font: 17px/1.65 var(--body);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: var(--lantern); text-underline-offset: 3px; }
a:hover { color: #ffc37a; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--lantern); outline-offset: 3px; }

h1, h2, h3, .brand, .lang button, nav a, .tag, .kicker, .card-links a {
  font-family: var(--pixel);
  font-weight: 400;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

/* Шапка */
.top {
  position: absolute; z-index: 5; inset: 0 0 auto 0;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 24px; padding: 20px clamp(16px, 4vw, 48px);
}
.top.solid { position: relative; border-bottom: 2px solid var(--line); background: var(--night-2); }
.brand {
  color: var(--snow); font-size: 20px; line-height: 1; text-decoration: none; letter-spacing: 1px;
  text-shadow: 1px 0 0 currentColor;
}
.brand:hover { color: var(--lantern); }
.top-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
nav a { color: var(--snow); font-size: 20px; line-height: 1.2; text-decoration: none; border-bottom: 2px solid transparent; }
nav a:hover, nav a[aria-current="page"] { color: var(--lantern); border-bottom-color: var(--lantern); }

.lang { display: none; border: 2px solid var(--line); background: rgba(11, 13, 22, .6); }
.js .lang { display: inline-flex; }
.lang button {
  appearance: none; border: 0; background: transparent; color: var(--frost);
  font-size: 20px; line-height: 1; padding: 6px 10px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--lantern); color: var(--night); }

/* Языки: без скрипта видно оба, со скриптом — выбранный */
.js [data-lang] { display: none; }
.js.ru [data-lang="ru"], .js.en [data-lang="en"] { display: block; }
.js.ru span[data-lang="ru"], .js.en span[data-lang="en"],
.js.ru a[data-lang="ru"], .js.en a[data-lang="en"] { display: inline; }

/* Первый экран: полосы из всех игр под студийным именем */
.hero {
  position: relative; min-height: min(84vh, 760px);
  display: flex; align-items: flex-end; overflow: hidden; isolation: isolate;
  background: var(--night);
}
.strips { position: absolute; inset: 0; z-index: -2; display: grid; grid-template-columns: repeat(4, 1fr); }
.strips div { background-size: cover; background-position: center; border-right: 2px solid var(--night); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(11, 13, 22, .78) 0, rgba(11, 13, 22, .28) 34%, rgba(11, 13, 22, .35) 55%, var(--night) 100%);
}
#snow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hero-text {
  position: relative; z-index: 2; width: 100%; max-width: 1180px; margin: 0 auto;
  padding: 120px clamp(16px, 4vw, 48px) clamp(32px, 5vw, 56px);
}
.kicker { color: var(--lantern); font-size: 20px; line-height: 1.2; margin: 0 0 14px; }
.title {
  margin: 0; color: var(--snow);
  font-size: 60px; line-height: 1;
  /* «жирная» копия на пиксель правее и жёсткая пиксельная тень */
  text-shadow: .05em 0 0 currentColor, .1em .1em 0 var(--night), .15em .1em 0 var(--night);
}
.lede { max-width: 36em; margin: 20px 0 0; font-size: clamp(18px, 2vw, 21px); line-height: 1.55; text-shadow: 0 1px 8px var(--night); }

/* Кегль пиксельного шрифта — кратный 10, иначе пиксели плывут */
@media (min-width: 761px) { .title { font-size: 90px; } }
@media (min-width: 1100px) { .title { font-size: 120px; } }

/* Блоки */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
section { padding: clamp(36px, 5vw, 64px) 0; scroll-margin-top: 16px; }
h2 { font-size: 30px; line-height: 1.2; margin: 0 0 20px; text-shadow: 1px 0 0 currentColor; }

/* Игры */
.games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card {
  display: flex; flex-direction: column;
  border: 2px solid var(--line); background: var(--panel);
  box-shadow: 6px 6px 0 #05060b;
}
.card-img { position: relative; overflow: hidden; background: #05060b; }
.card-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-img img { transform: scale(1.03); }
.card-img img.px { image-rendering: pixelated; }
.tag {
  position: absolute; left: 12px; bottom: 12px;
  padding: 6px 10px; font-size: 20px; line-height: 1;
  color: var(--night); background: var(--lantern); box-shadow: 3px 3px 0 var(--ember);
}
.tag.quiet { background: var(--snow); box-shadow: 3px 3px 0 #555a70; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 30px; line-height: 1.1; margin: 0 0 10px; text-shadow: 1px 0 0 currentColor; }
.card p { margin: 0 0 14px; }
.note { color: var(--frost); font-size: 14px; margin-top: auto !important; }
.card-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: auto; }
.card-links a { font-size: 20px; line-height: 1.2; }

/* Студия и реквизиты */
.studio { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.studio p { margin: 0 0 14px; }
.ledger { border: 2px solid var(--line); background: var(--panel); padding: 20px 22px; box-shadow: 6px 6px 0 #05060b; }
.ledger h3 { font-size: 20px; line-height: 1; margin: 0 0 14px; color: var(--lantern); }
.ledger dl { margin: 0; display: grid; gap: 10px; }
.ledger dt { font-size: 14px; color: var(--frost); }
.ledger dd { margin: 0; overflow-wrap: anywhere; }

/* Документы */
.doc { max-width: 760px; margin: 0 auto; padding: clamp(32px, 6vw, 64px) clamp(16px, 4vw, 24px); }
.doc h1 { font-size: 40px; line-height: 1.05; margin: 0 0 12px; text-shadow: .05em 0 0 currentColor, .1em .1em 0 #000; }
.doc h2 { font-size: 20px; color: var(--lantern); margin: 34px 0 8px; text-shadow: none; }
.doc p { margin: 0 0 12px; }
.meta { color: var(--frost); font-size: 15px; margin-bottom: 26px !important; }
.doc [data-lang] + [data-lang] { margin-top: 56px; padding-top: 40px; border-top: 2px solid var(--line); }
.js .doc [data-lang] + [data-lang] { margin-top: 0; padding-top: 0; border-top: 0; }

footer { background: #05060b; color: var(--frost); font-size: 15px; margin-top: 24px; border-top: 2px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 20px; padding-bottom: 24px; }
footer a { color: var(--frost); }

@media (max-width: 760px) {
  .games, .studio { grid-template-columns: 1fr; }
  .strips { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); }
  .hero { min-height: 78vh; }
  .top { padding: 14px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #snow { display: none; }
  .card-img img { transition: none; }
}
