:root {
  --felt: #087940;
  --green: #086136;
  --ink: #163829;
  --ivory: #fff8e8;
  --paper: #f7efdc;
  --warm-gold: #f2cf78;
  --line: #d7cfb8;
  --serif: "Iowan Old Style", Georgia, serif;
  font: 16px/1.55 system-ui, sans-serif;
  color: var(--ink);
  background: var(--ivory);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: .22em; }
a:focus-visible { outline: 3px solid #a76616; outline-offset: 5px; }
a:hover { text-decoration-thickness: 2px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.1; }
h1, h2 { font-family: var(--serif); }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }

.site-header {
  min-height: 4.75rem;
  padding: .8rem max(1.5rem, calc((100vw - 82rem)/2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  font-weight: 850;
  letter-spacing: .13em;
  white-space: nowrap;
}

.site-mark { flex: none; width: 1.875rem; height: 1.875rem; border-radius: 21%; }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem clamp(.65rem, 2vw, 1.6rem); }
.site-header nav a { font-size: .93rem; text-decoration: none; }
.site-header nav a:hover, nav a[aria-current] { text-decoration: underline; }
.site-header .language { border-left: 1px solid var(--line); padding-left: .8em; font-weight: 700; }

.hero {
  padding: clamp(2.75rem, 7vw, 7rem) max(1.5rem, calc((100vw - 82rem)/2));
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(16rem, 40fr) minmax(0, 60fr);
  align-items: center;
  gap: clamp(1.75rem, 5vw, 5rem);
  background-color: var(--felt);
  background-image: linear-gradient(90deg, #076c39 0%, #087941 33%, transparent 64%),
    radial-gradient(ellipse at 65% 12%, #21854b 1%, transparent 60%),
    radial-gradient(ellipse at right bottom, #067237 0%, transparent 65%),
    repeating-linear-gradient(115deg, #064b280a 0 1px, #e8ffa508 1px 3px);
  color: var(--ivory);
}

.app-icon { border-radius: 21%; margin-bottom: 1.35rem; box-shadow: 0 4px 12px #11412350; }
.hero h1 { font-size: clamp(3.35rem, 6vw, 6rem); letter-spacing: -.046em; line-height: .96; text-wrap: balance; }
:lang(ru) .hero h1 { font-size: clamp(2.8rem, 5.25vw, 5.35rem); overflow-wrap: anywhere; }
.hero p { margin: 1.3rem 0 1.75rem; max-width: 27ch; font-size: clamp(1.12rem, 2vw, 1.45rem); line-height: 1.4; }
.button {
  display: inline-block;
  padding: .72rem 1.2rem;
  border-radius: .25rem;
  background: var(--warm-gold);
  color: #253121;
  font-weight: 760;
  text-decoration: none;
}
.button:hover { background: #ffe092; }
.hero :focus-visible { outline-color: var(--ivory); }
.game-frame, .journey-frame {
  background: #124e30;
  border: 1px solid #b99552;
  outline: 1px dashed #d4b975;
  outline-offset: .35rem;
  overflow: hidden;
}
.game-frame img, .journey-frame img { width: 100%; }
.journey-frame img { max-height: 25rem; object-fit: contain; }

.play, .modes {
  width: min(100% - 3rem, 76rem);
  margin: 0 auto;
  padding: clamp(2.8rem, 6vw, 5.2rem) 0;
}

.play { border-bottom: 1px solid var(--line); }
.play h2, .modes h2 { font-size: clamp(2.25rem, 4.5vw, 4.5rem); letter-spacing: -.035em; }
.section-intro { margin-top: .8rem; max-width: 65ch; font-size: 1.1rem; }
.steps, .modes ul { margin: 1.65rem 0 0; padding: 0; list-style: none; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.steps li { border-top: 2px solid var(--green); padding: 1rem .8rem 0 0; }
.steps p, .modes li p { margin-top: .45rem; }
.modes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.38fr); gap: clamp(1rem, 5vw, 5rem); align-items: center; }
.modes li + li { margin-top: 1.1rem; }

.document {
  width: min(100% - 3rem, 49rem);
  margin: 0 auto;
  padding: clamp(2.75rem, 6vw, 6rem) 0;
  overflow-wrap: anywhere;
}
.document h1 { font-size: clamp(2.3rem, 5.5vw, 4.8rem); letter-spacing: -.045em; }
.document section { margin-top: 1.7rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.document h2 { font-size: clamp(1.3rem, 2.5vw, 1.9rem); margin-bottom: .48rem; }
.document-meta { margin-top: 1rem; }
.contact-block { margin-top: 1.8rem; }
.contact-block p + p { margin-top: .5rem; }

footer {
  padding: 1.75rem max(1.5rem, calc((100vw - 76rem)/2));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .7rem 1.3rem;
  background: var(--paper);
  border-top: 1px solid var(--line);
  font-size: .93rem;
}
footer p { flex: 1 1 18rem; }
[hidden] { display: none !important; }

@media (max-width: 51rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    background-image: linear-gradient(180deg, #076c39 0%, #087941 54%, transparent 85%),
      repeating-linear-gradient(115deg, #064b280a 0 1px, #e8ffa508 1px 3px);
  }
  .hero p { max-width: 34ch; }
}
@media (max-width: 36rem) {
  .site-header { flex-direction: column; align-items: flex-start; gap: .4rem; }
  .site-header nav a { font-size: .82rem; }
  .steps, .modes { grid-template-columns: minmax(0, 1fr); }
  .steps li { padding-bottom: .4rem; }
}
