/* GoodRise Games / Mallet Knights - static site styles. No frameworks. */
@font-face { font-family: "Nunito"; src: url("../fonts/Nunito-Regular.affd89e1ac.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/Nunito-ExtraBold.f7c1501aa7.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
	--bg: #f4f8fc;
	--surface: #ffffff;
	--surface-2: #e8f0f8;
	--text: #14202e;
	--muted: #4d5d70;
	--line: #d3dfeb;
	--ice: #2b8fd6;
	--yarn: #e8892b;
	--yarn-ink: #ffffff;
	--focus: #e8892b;
	--radius: 16px;
	--shadow: 0 6px 24px rgba(20, 32, 46, 0.08);
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #0e1620; --surface: #16212e; --surface-2: #1d2b3a; --text: #eaf2fa; --muted: #a3b4c6;
		--line: #2a3a4c; --ice: #6cc1ff; --yarn: #ffa14a; --yarn-ink: #1a1006; --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--bg: #0e1620; --surface: #16212e; --surface-2: #1d2b3a; --text: #eaf2fa; --muted: #a3b4c6;
	--line: #2a3a4c; --ice: #6cc1ff; --yarn: #ffa14a; --yarn-ink: #1a1006; --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
	color-scheme: dark;
}

/* Language switch: both languages are in the page, CSS hides the other one. No JS = English. */
html:not([data-lang="ru"]) [data-l="ru"] { display: none !important; }
html[data-lang="ru"] [data-l="en"] { display: none !important; }
html:not([data-lang="zh"]) [data-l="zh"] { display: none !important; }
html[data-lang="zh"] [data-l="en"] { display: none !important; }
/* Chinese: Nunito has no CJK glyphs, so the system fonts take over (no font download). */
html[data-lang="zh"] body { font-family: "Nunito", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif; line-height: 1.7; }
html[data-lang="zh"] h1, html[data-lang="zh"] h2, html[data-lang="zh"] h3 { letter-spacing: 0; line-height: 1.3; }
.langs { display: inline-flex; gap: 4px; }
.langs .tool { padding: 6px 10px; }
.langs .tool[aria-pressed="true"] { background: var(--ice); color: #fff; border-color: transparent; }


* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0; background: var(--bg); color: var(--text);
	font: 400 17px/1.6 "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
.hero-grid > *, .grid-2 > *, .grid-3 > *, .shots > *, .site-footer .wrap > * { min-width: 0; }
h1, h2, h3, p, dd, .placeholder { overflow-wrap: anywhere; }
a { color: var(--ice); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { font-weight: 800; line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

/* Header */
/* slide-in blocks start 24 px to the right: never let that widen the page (17.11: 414 px wide page on a 390 px phone) */
main, .site-footer, footer { overflow-x: clip; }
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text); text-decoration: none; font-size: 1.1rem; }
.brand svg { width: 34px; height: 34px; }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; margin-left: auto; }
.nav a { color: var(--text); text-decoration: none; font-weight: 800; font-size: 0.95rem; }
.nav a[aria-current="page"], .nav a:hover { color: var(--ice); }
.tools { display: flex; gap: 8px; }
.tool { font: inherit; font-weight: 800; font-size: 0.85rem; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; text-decoration: none; border-radius: 999px; padding: 12px 22px; border: 2px solid transparent; }
.btn-primary { background: var(--yarn); color: var(--yarn-ink); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0; }

/* Sections */
section { padding: 56px 0; }
.hero { padding: 64px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.kicker { text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; font-size: 0.8rem; color: var(--yarn); }
.lead { font-size: 1.2rem; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.shot { margin: 0; }
.shot img { border-radius: 12px; border: 1px solid var(--line); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.shot figcaption { font-size: 0.82rem; color: var(--muted); margin-top: 6px; }
.badge { display: inline-block; font-size: 0.75rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }

/* Placeholders (key art, trailer, logo) */
.placeholder { display: grid; place-items: center; text-align: center; aspect-ratio: 16 / 9; border-radius: var(--radius); border: 2px dashed var(--line); background: repeating-linear-gradient(45deg, var(--surface-2) 0 14px, var(--surface) 14px 28px); color: var(--muted); font-weight: 800; padding: 16px; }
.keyart { aspect-ratio: 4 / 3; }

/* Feature list */
.features h3 { color: var(--ice); }

/* Fact sheet (press kit) */
.facts { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; margin: 0; }
.facts dt { font-weight: 800; color: var(--muted); }
.facts dd { margin: 0; }
.toc { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 0; list-style: none; }

/* Prose pages (privacy) */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; font-size: 1.35rem; }
.prose ul { padding-left: 1.2em; }
.todo { background: color-mix(in srgb, var(--yarn) 22%, transparent); border-radius: 4px; padding: 0 4px; }

/* Charity note */
.giving { border-left: 4px solid var(--yarn); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.site-footer a { color: var(--muted); }

@media (max-width: 820px) {
	.hero-grid, .grid-3, .grid-2, .site-footer .wrap { grid-template-columns: 1fr; }
	.shots { grid-template-columns: repeat(2, 1fr); }
	.facts { grid-template-columns: 1fr; }
	.facts dt { margin-top: 8px; }
	.nav { margin-left: 0; width: 100%; order: 3; padding-bottom: 8px; }
	section { padding: 40px 0; }
}
@media (max-width: 480px) { .shots { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* 16.11.2026: store text variants. The user has not picked A or B yet (Docs/STEAM_STORE_PAGE.md §2.1 / §2.1-Ч, §2.2 / §2.7).
   Both are in the page; <html data-variant="b"> shows B (default), "a" shows A. Swap = change that one attribute on each page
   (or preview with ?v=a). No JS = B. */
html:not([data-variant="a"]) [data-v="a"] { display: none !important; }
html[data-variant="a"] [data-v="b"] { display: none !important; }

.date-badge { display: inline-block; font-weight: 800; background: var(--yarn); color: var(--yarn-ink); border-radius: 999px; padding: 4px 14px; font-size: 0.95rem; }
.keyart-img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 1232 / 706; object-fit: cover; }
.trailer-slot { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: #0b1018; }
.trailer-slot img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.trailer-slot span { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #fff; font-weight: 800; font-size: 1.2rem; text-shadow: 0 2px 8px rgba(0,0,0,.6); padding: 16px; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.modes .card img { border-radius: 10px; margin-bottom: 12px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.logo-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.logo-tiles .card { display: grid; place-items: center; gap: 8px; }
.logo-tiles .dark { background: #111; }
@media (max-width: 820px) { .modes, .logo-tiles { grid-template-columns: 1fr; } }

/* steam widget (build_mk_page.py) */
.steam-widget { display: none; }
@media (min-width: 700px) {
	.steam-widget { display: flex; justify-content: center; margin: 22px auto 0; max-width: 100%; }
	.steam-widget iframe { display: block; width: 646px; height: 190px; max-width: 100%; border: 0; border-radius: 6px; background: #1b2838; box-shadow: 0 10px 30px rgba(0, 0, 0, .28); }
	.steam-band { padding: 0 0 8px; }
}
/* end steam widget */

/* studio logo in the header: one lockup per theme (build_brand.py) */
.brand-logo { display: block; height: 56px; width: auto; }
.brand { padding: 4px 0; }
.brand-dark { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .brand-light { display: none; }
	:root:not([data-theme="light"]) .brand-dark { display: block; }
}
:root[data-theme="dark"] .brand-light { display: none; }
:root[data-theme="dark"] .brand-dark { display: block; }
.brand { transition: transform .15s ease; }
.brand:hover { transform: scale(1.04); }
@media (max-width: 560px) { .brand-logo { height: 46px; } .brand { padding: 8px 0 2px; } }
@media (prefers-reduced-motion: reduce) { .brand { transition: none; } .brand:hover { transform: none; } }
