/*
 * Vita Mahjong — «Лесная тишина»
 * Палитра: тёплый кремовый фон + изумрудные акценты + древесные тона
 * Шрифты: системные sans-serif, крупные (senior-friendly)
 */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #F5F0E6;
  --bg-card: #FFFDF8;
  --bg-header: #2D5A3D;
  --bg-footer: #1E3D2A;
  --accent: #2D8B5A;
  --accent-light: #4CAF7D;
  --accent-dark: #1B6B3F;
  --gold: #C49A2A;
  --gold-light: #E8C55A;
  --wood: #8B6914;
  --wood-light: #A68B3C;
  --text: #3A2E1F;
  --text-light: #6B5D4F;
  --text-inverse: #F5F0E6;
  --border: #D4C9B5;
  --shadow: rgba(58, 46, 31, 0.08);
  --shadow-md: rgba(58, 46, 31, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 18px; }

a { color: var(--accent-dark); text-decoration: underline; text-decoration-color: var(--border); }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { color: var(--text); line-height: 1.3; }
h1 { font-size: 2rem; margin-bottom: 12px; }
h2 { font-size: 1.5rem; margin: 32px 0 14px; }
h3 { font-size: 1.2rem; margin: 20px 0 10px; }

p { margin-bottom: 12px; }
ul, ol { margin: 0 0 14px 22px; }
li { margin-bottom: 6px; }

/* === Header === */
.site-header {
  background: var(--bg-header);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px var(--shadow-md);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-inverse);
  font-weight: 700;
  font-size: 1.15rem;
  white-space: nowrap;
}
.logo small { display: block; font-size: 0.7rem; font-weight: 400; opacity: 0.75; }
.logo-icon { font-size: 1.6rem; }
.burger {
  display: none;
  background: none;
  border: none;
  color: var(--text-inverse);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 4px 8px;
}
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  color: rgba(245,240,230,0.8);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}
.nav a:hover, .nav a.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* === Breadcrumbs === */
.crumbs {
  padding: 12px 18px;
  font-size: 0.85rem;
  color: var(--text-light);
}
.crumbs a { color: var(--accent); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* === Hero === */
.hero {
  background: linear-gradient(135deg, var(--bg-header) 0%, var(--accent-dark) 100%);
  color: var(--text-inverse);
  padding: 48px 0 36px;
  text-align: center;
}
.hero h1 { color: #fff; font-size: 2.2rem; }
.hero .hl { color: var(--gold-light); }
.hero .sub { font-size: 1.1rem; opacity: 0.9; margin-bottom: 20px; max-width: 640px; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.1s, box-shadow 0.15s;
  border: 2px solid transparent;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px var(--shadow-md); }
.btn-cta {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}
.btn-cta:hover { background: var(--gold-light); color: var(--text); border-color: var(--gold-light); }
.btn-store {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-store:hover { background: var(--accent-light); color: #fff; border-color: var(--accent-light); }
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

/* === Cards === */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 2px 8px var(--shadow);
  border: 1px solid var(--border);
  transition: box-shadow 0.15s;
}
.card:hover { box-shadow: 0 4px 16px var(--shadow-md); }

.grid { display: grid; gap: 16px; margin: 16px 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* === Feature cards (main page) === */
.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 2px 8px var(--shadow);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.1s, box-shadow 0.15s;
  display: block;
}
.feature-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px var(--shadow-md); }
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 12px;
}
.feature-card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.feature-card p { margin: 0; font-size: 0.9rem; color: var(--text-light); }

/* === Mode cards === */
.mode-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 2px 8px var(--shadow);
  border-left: 4px solid var(--accent);
}
.mode-card h3 { margin-top: 0; }

/* === Table === */
.table-wrap { overflow-x: auto; margin: 16px 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg-header); color: #fff; font-weight: 600; }
tr:nth-child(even) { background: rgba(0,0,0,0.02); }

/* === Tier badges === */
.tier { display: inline-block; padding: 2px 10px; border-radius: 20px; font-weight: 700; font-size: 0.85rem; }
.tier-s { background: #FFD700; color: #3A2E1F; }
.tier-a { background: #4CAF7D; color: #fff; }
.tier-b { background: #5B9BD5; color: #fff; }
.tier-c { background: #A0A0A0; color: #fff; }

/* === Guide cards === */
.guide-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 2px 8px var(--shadow);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: transform 0.1s, box-shadow 0.15s;
}
.guide-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px var(--shadow-md); }
.guide-num {
  display: inline-flex;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

/* === News === */
.news-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 2px 8px var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.news-date { color: var(--text-light); font-size: 0.85rem; margin-bottom: 4px; }

/* === FAQ === */
.faq details {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
}
.faq summary {
  font-weight: 600;
  cursor: pointer;
  font-size: 1.05rem;
}
.faq details[open] summary { margin-bottom: 10px; }

/* === Notes === */
.note {
  font-size: 0.88rem;
  color: var(--text-light);
  padding: 10px 14px;
  background: rgba(45,139,90,0.06);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}
.note.warn-note {
  background: rgba(196,154,42,0.08);
  border-left-color: var(--gold);
}

/* === Screenshot === */
.shot {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
}

/* === Footer === */
.site-footer {
  background: var(--bg-footer);
  color: var(--text-inverse);
  padding: 36px 0 20px;
  margin-top: 48px;
}
.site-footer h4 { color: var(--gold-light); margin-bottom: 10px; }
.site-footer a { color: var(--accent-light); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 20px; }
.disclaimer { font-size: 0.8rem; opacity: 0.6; text-align: center; margin-top: 16px; }

.float-download { display: none; }

/* === Step list === */
.step-list { counter-reset: steps; list-style: none; margin-left: 0; }
.step-list li {
  counter-increment: steps;
  padding-left: 44px;
  position: relative;
  margin-bottom: 16px;
}
.step-list li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

/* === Responsive === */
@media (max-width: 768px) {
  .burger { display: block; }
  .nav { display: none; flex-direction: column; width: 100%; }
  .nav.open { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .cols { grid-template-columns: 1fr; }
  h1 { font-size: 1.6rem; }
  .hero h1 { font-size: 1.7rem; }
  .hero { padding: 32px 0 24px; }
}
