/* Pixel Cat — pixelcat.mobi
   Static site. No build step, no external dependencies, no fonts from CDN.
   Palette taken from the game (scripts/main.gd): dark #12121F, panel #29336B,
   accent yellow #FFD126, steel text #93A1C4, white body text.
   Signature detail: hard pixel shadow, offset down-right, zero blur. */

:root {
  --bg:       #12121F;
  --surface:  #1A1A2B;
  --panel:    #29336B;
  --accent:   #FFD126;
  --steel:    #93A1C4;
  --text:     #FFFFFF;
  --shadow:   #07070D;
  /* A 1 px line in the panel colour reads as a muddy violet rule: the hex is a
     fill, not a stroke. Separation is done with space, one hairline and the
     yellow tick; frames around images are darker than the page, never purple. */
  --hair:     rgba(255, 255, 255, 0.07);
  --edge:     #0B0B14;

  --shadow-hard: 6px 6px 0 var(--shadow);
  --shadow-hard-sm: 4px 4px 0 var(--shadow);

  --maxw: 880px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
               "Noto Sans", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  overflow-wrap: break-word;
}

/* ---- language switching -------------------------------------------------
   Both languages live in the markup. CSS hides the inactive one, so the page
   is readable with JavaScript disabled (document starts as lang="ru"). */
html[lang="ru"] [data-l="en"] { display: none !important; }
html[lang="en"] [data-l="ru"] { display: none !important; }

/* ---- layout ------------------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section { padding: 40px 0; }
section + section { padding-top: 8px; }

/* ---- header ------------------------------------------------------------ */
.site-head {
  border-bottom: 1px solid var(--hair);
  padding: 16px 0;
}
.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}
.brand img {
  width: 44px;
  height: 44px;
  display: block;
  image-rendering: pixelated;
  border: 2px solid var(--edge);
  box-shadow: var(--shadow-hard-sm);
  background: var(--surface);
}
.brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.brand-domain {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--steel);
  letter-spacing: 0.04em;
}

.langs {
  margin-left: auto;
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.langs a {
  display: block;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--steel);
  background: var(--surface);
  border: 2px solid var(--surface);
}
.langs a:hover { color: var(--text); background: #222238; border-color: #222238; }
html[lang="ru"] .langs a[data-lang="ru"],
html[lang="en"] .langs a[data-lang="en"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #12121F;
}

/* ---- typography -------------------------------------------------------- */
h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 16px;
  letter-spacing: 0.01em;
}
h1 { font-size: 34px; }
h2 { font-size: 24px; }
h3 { font-size: 19px; }

h2 .bar {
  display: block;
  width: 56px;
  height: 6px;
  background: var(--accent);
  margin-bottom: 14px;
}

p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: 19px;
  color: var(--text);
}
.muted { color: var(--steel); }
.small { font-size: 14px; }

a { color: var(--accent); }
a:hover { color: #fff; }

ul { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 8px; }

code, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
}

/* ---- hero -------------------------------------------------------------- */
.hero { padding: 48px 0 40px; }
.hero h1 { margin-bottom: 18px; }
.hero .lead { max-width: 52ch; }

/* ---- cards ------------------------------------------------------------- */
.card {
  background: var(--surface);
  box-shadow: var(--shadow-hard);
  padding: 22px;
}
.card + .card { margin-top: 28px; }

.card-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.card-head h3 { margin: 0; }

.tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--panel);
  color: var(--text);
  border: 2px solid var(--panel);
  box-shadow: var(--shadow-hard-sm);
}
.tag-wip {
  background: var(--accent);
  border-color: var(--accent);
  color: #12121F;
}

.facts {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.facts li {
  margin: 0;
  font-size: 13px;
  color: var(--steel);
  background: var(--bg);
  border: 2px solid var(--bg);
  padding: 4px 10px;
}

/* ---- screenshots ------------------------------------------------------- */
.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}
.shots figure { margin: 0; }
.shots img {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid var(--edge);
  box-shadow: var(--shadow-hard-sm);
  background: var(--bg);
}
.shots figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--steel);
}

/* ---- buttons / contact ------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 12px 20px;
  font-weight: 700;
  text-decoration: none;
  background: var(--accent);
  color: #12121F;
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-hard);
}
.btn:hover { color: #12121F; background: #fff; border-color: #fff; }
.btn:active { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--shadow); }

.btn-ghost {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--panel);
}
.btn-ghost:hover { background: var(--panel); color: #fff; }

.contact-mail {
  display: inline-block;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  word-break: break-all;
}

/* ---- placeholders / unfinished blocks ---------------------------------- */
.todo {
  border: 2px dashed var(--accent);
  background: #20201c;
  padding: 18px;
  margin: 22px 0;
}
.todo-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.ph {
  background: var(--panel);
  color: var(--accent);
  padding: 1px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

/* ---- legal page -------------------------------------------------------- */
.legal section { padding: 32px 0; }
.legal .card { margin: 22px 0; }
.legal h2 { font-size: 21px; }
.updated {
  font-size: 14px;
  color: var(--steel);
  border-left: 6px solid var(--accent);
  padding-left: 12px;
  margin-bottom: 0;
}

/* ---- footer ------------------------------------------------------------ */
.site-foot {
  border-top: 1px solid var(--hair);
  padding: 28px 0 40px;
  color: var(--steel);
  font-size: 14px;
}
.site-foot a { color: var(--steel); text-decoration: underline; }
.site-foot a:hover { color: var(--accent); }
.foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
}

/* ---- skip link --------------------------------------------------------- */
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 8px;
  z-index: 10;
  background: var(--accent);
  color: #12121F;
  padding: 8px 14px;
}

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---- narrow screens ---------------------------------------------------- */
@media (max-width: 700px) {
  body { font-size: 16px; }
  h1 { font-size: 27px; }
  h2 { font-size: 21px; }
  .hero { padding: 32px 0 28px; }
  section { padding: 32px 0; }
  .shots { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .shots figure:nth-child(3) { grid-column: 1 / -1; max-width: 60%; }
}

@media (max-width: 420px) {
  :root { --gutter: 14px; --shadow-hard: 5px 5px 0 var(--shadow); }
  body { font-size: 16px; }
  h1 { font-size: 24px; }
  .lead { font-size: 17px; }
  .brand img { width: 38px; height: 38px; }
  .brand-name { font-size: 18px; }
  .card { padding: 16px; }
  .btn { display: block; text-align: center; }
  .shots { grid-template-columns: 1fr 1fr; }
  .shots figure:nth-child(3) { grid-column: 1 / -1; max-width: 50%; }
  .contact-mail { font-size: 17px; }
}
