@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,520;9..144,640&family=Outfit:wght@380;460;560&display=swap");

:root {
  --bg: #100e0c;
  --bg-2: #181510;
  --ink: #f4efe6;
  --muted: #a79e91;
  --faint: #6f675d;
  --line: rgba(244, 239, 230, 0.12);
  --gold: #e4b15a;
  --gold-2: #f0d7a2;
  --ember: #d4653a;
  --card: #1b1814;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --max: 1120px;
  --pad: clamp(1.1rem, 3vw, 2rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.05rem/1.55 var(--sans);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
a { color: var(--gold-2); text-underline-offset: 0.18em; }
a:hover { color: white; }
button, input, select, textarea { font: inherit; color: inherit; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
button, .btn {
  transition: transform 0.12s ease, background-color 0.15s ease, color 0.15s ease;
}
button:active, .btn:active { transform: scale(0.97); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

html[lang="ru"] .t-en { display: none; }
html[lang="en"] .t-ru { display: none; }

.page-game {
  background:
    radial-gradient(ellipse 70% 42% at 80% -8%, rgba(228, 177, 90, 0.16), transparent 55%),
    radial-gradient(ellipse 42% 36% at -8% 18%, rgba(212, 101, 58, 0.14), transparent 60%),
    var(--bg);
}
.page-studio {
  background:
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(228, 177, 90, 0.1), transparent 50%),
    var(--bg);
}

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 0.85rem var(--pad);
  background: rgba(16, 14, 12, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 560;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}
.brand img { width: 28px; height: 28px; }
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-left: auto;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.langs { display: flex; gap: 0.2rem; }
.langs button {
  background: transparent;
  border: 0;
  color: var(--faint);
  padding: 0.35rem 0.4rem;
  cursor: pointer;
}
html[lang="ru"] .langs [data-set-lang="ru"],
html[lang="en"] .langs [data-set-lang="en"] { color: var(--gold); }

.wrap { width: min(var(--max), calc(100% - var(--pad) * 2)); margin: 0 auto; }
.hero { padding: clamp(3.2rem, 8vw, 6.5rem) 0 2.5rem; }
.kicker {
  margin: 0 0 0.8rem;
  color: var(--gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.75rem;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 520; letter-spacing: -0.02em; }
h1 {
  margin: 0;
  font-size: clamp(3.4rem, 9vw, 7.2rem);
  line-height: 0.9;
  font-weight: 640;
}
.lead {
  max-width: 38rem;
  margin: 1.3rem 0 0;
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.5;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.8rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0;
}
.btn span { font-size: 1.05rem; }
.btn-gold { background: var(--gold); color: #1a140c; border-color: var(--gold); font-weight: 560; }
.btn-gold:hover { background: var(--gold-2); color: #1a140c; }

.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.strip div { padding: 1.15rem 1rem 1.2rem; }
.strip div + div { border-left: 1px solid var(--line); }
.strip strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 520;
}
.strip span { color: var(--muted); font-size: 0.9rem; }

section { padding: clamp(2.8rem, 6vw, 4.6rem) 0; }
.section-head { max-width: 36rem; margin-bottom: 1.6rem; }
.section-head h2 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; }
.section-head p { margin: 0.7rem 0 0; color: var(--muted); }

.cards, .nations { display: grid; gap: 0.8rem; }
.cards { grid-template-columns: repeat(3, 1fr); }
.nations { grid-template-columns: repeat(4, 1fr); }
.card, .nation, .panel, .legal, .steps, form.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.card, .nation { padding: 1.15rem 1.15rem 1.25rem; }
.card h3, .nation h3 { margin: 0.35rem 0 0.4rem; font-size: 1.45rem; }
.card p, .nation p { margin: 0; color: var(--muted); }
.index { color: var(--gold); font-size: 0.78rem; letter-spacing: 0.14em; }

.nation { min-height: 100%; }
.nation .tag {
  display: inline-block;
  margin-top: 0.85rem;
  color: var(--faint);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.swatch { width: 100%; height: 3px; border-radius: 99px; background: var(--swatch, var(--gold)); }

.feature {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
  align-items: start;
}
code { white-space: nowrap; }
.feature .panel { padding: clamp(1.4rem, 3vw, 2.2rem); }
.feature h2 { margin: 0 0 0.6rem; font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 0.98; }
.quiet { color: var(--muted); }
.meta { color: var(--faint); font-size: 0.92rem; }

.links { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.2rem; }
.links a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.05rem;
}

.faq { display: grid; gap: 0.55rem; }
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 1rem;
}
.faq summary { cursor: pointer; font-weight: 560; }
.faq details p { margin: 0.7rem 0 0; color: var(--muted); }

.prose { max-width: 42rem; }
.prose h2 { margin: 2rem 0 0.4rem; font-size: 1.7rem; }
.prose p, .prose li { color: #ddd6cb; }
.prose .meta, .legal .meta { color: var(--faint); }

.legal, .steps, form.panel { padding: clamp(1.2rem, 3vw, 2rem); }
.steps ol, .legal ul, .legal ol { padding-left: 1.15rem; }
.legal h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.legal h2 { font-size: 1.35rem; margin: 1.6rem 0 0.35rem; }
.legal hr { border: 0; border-top: 1px solid var(--line); margin: 2.2rem 0; }

label { display: block; margin: 0.9rem 0 0.35rem; color: var(--muted); font-size: 0.92rem; }
input, select, textarea {
  width: 100%;
  background: #100e0c;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.8rem;
}
textarea { min-height: 7rem; resize: vertical; }
form .btn { margin-top: 1rem; border: 0; cursor: pointer; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem var(--pad) 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.4rem;
  color: var(--faint);
  font-size: 0.92rem;
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.7rem 1.1rem; }

@media (max-width: 980px) {
  .cards, .nations, .strip, .feature { grid-template-columns: 1fr 1fr; }
  .strip div:nth-child(odd) { border-left: 0; }
  .strip div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .top { flex-wrap: wrap; }
  .nav { order: 3; width: 100%; margin-left: 0; }
  .cards, .nations, .strip, .feature { grid-template-columns: 1fr; }
  .strip div + div, .strip div:nth-child(n + 3) { border-left: 0; border-top: 1px solid var(--line); }
  h1 { font-size: 3.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  button, .btn { transition: none; }
  button:active, .btn:active { transform: none; }
}
