/*
 * APPYAPP - styles.css
 * Единственный CSS редизайна. Токены взяты 1:1 из design-system/01-tokens-indigo.html
 * (Task 1). Компоненты - как в карточках design-system/*.html: радиусы, мягкие тени,
 * светлый фон, акцентные кнопки. Копируется в dist/styles.css через buildAll()
 * (scripts/build-pages.js) и подключается со всех страниц как /styles.css.
 */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --text: #16181d;
  --muted: #5b6472;
  --border: #e5e8ee;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(22, 24, 29, .06), 0 8px 24px rgba(22, 24, 29, .07);
  --font-head: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --accent: #4353ff; /* индиго, утверждён владельцем 2026-08-14 */
  --accent-ink: #ffffff;
}

/* ---------- Reset & base ---------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-alt);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--text);
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: var(--text);
  text-decoration: none;
}

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

.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border);
}

/* ---------- .nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo-img {
  height: 26px;
  width: auto;
  display: block;
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--accent);
}

.lang-switch {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.lang-switch:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- .hero ---------- */

.hero {
  max-width: 880px;
  margin: 48px auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 64px 56px;
  text-align: center;
}

.hero .badge {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--bg));
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 44px;
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 18px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.hero .subtitle {
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 32px;
}

.hero .cta-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* ---------- .stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
}

.stat-value {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- .game-card ---------- */

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.game-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  color: var(--text);
  transition: transform .2s, border-color .2s;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.game-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.game-card-info {
  padding: 14px 16px;
}

.game-card-info h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.genre-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 8px;
}

.rating-line {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 10px;
}

.game-card .rating {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.rating-suffix {
  font-size: 12px;
  color: var(--muted);
}

.store-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.store-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--bg-alt);
}

.store-badge:hover {
  border-color: var(--accent);
}

.store-badge .arrow {
  color: var(--accent);
  font-family: var(--font-head);
}

.coming-soon-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  margin-top: 4px;
}

/* ---------- .platforms ---------- */

.platforms {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 32px;
}

.platform-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 220px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  background: var(--bg);
}

.platform-badge:hover {
  border-color: var(--accent);
}

.platform-badge .arrow {
  color: var(--accent);
  font-family: var(--font-head);
}

/* ---------- .team ---------- */

.team {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 32px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.team-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 24px;
  text-align: center;
}

.team-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 auto 16px;
  overflow: hidden;
  background: color-mix(in srgb, var(--accent) 15%, var(--bg));
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.team-card p {
  font-size: 13px;
  color: var(--muted);
}

.team-heading {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
}

.team-note {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  margin-top: 20px;
}

/* ---------- .contact ---------- */

.contact {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 32px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
}

.contact-info a {
  color: var(--accent);
  font-weight: 600;
}

.contact-info span {
  color: var(--muted);
  font-size: 14px;
}

.contact-requisites {
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 4px;
}

.contact-requisites a {
  color: var(--accent);
  font-weight: 600;
}

/* ---------- .footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 32px;
  text-align: center;
  margin-top: 64px;
}

.footer-legal {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.footer-links a:hover {
  color: var(--accent);
}

/* ---------- .requisites-table (/company) ---------- */

.requisites-table {
  width: 100%;
  border-collapse: collapse;
}

.requisites-table th,
.requisites-table td {
  text-align: left;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: top;
}

.requisites-table tr:last-child th,
.requisites-table tr:last-child td {
  border-bottom: none;
}

.requisites-table th {
  width: 160px;
  font-weight: 600;
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding-right: 16px;
}

.requisites-table td {
  color: var(--text);
  font-weight: 500;
}

/* ---------- .legal (типографика документов: /privacy, /terms, /data-deletion) ---------- */

.legal {
  max-width: 760px;
  margin: 48px auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px;
}

.legal h1 {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 10px;
}

.legal .updated {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 32px;
}

.legal .toc {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 36px;
}

.legal .toc-title {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}

.legal .toc ol {
  margin: 0;
  padding-left: 20px;
}

.legal .toc li {
  font-size: 14px;
  margin-bottom: 6px;
}

.legal .toc a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.legal .toc a:hover {
  text-decoration: underline;
}

.legal h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 32px 0 14px;
}

.legal h2:first-of-type {
  margin-top: 0;
}

.legal p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 16px;
}

.legal ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.legal li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 6px;
}

/* ---------- Секции (About / Games / Team / Contact заголовки) ---------- */

.section {
  padding: 64px 0;
}

.section h2 {
  font-size: 30px;
  font-weight: 600;
  text-align: center;
  margin: 0 0 40px;
}

.section-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 560px;
  margin: -16px auto 32px;
}

/* ---------- .about ---------- */

.about {
  max-width: 720px;
  margin: 0 auto 48px;
  padding: 0 32px;
}

.about-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  text-align: center;
}

/* ---------- Адаптив: < 720px одной колонкой ---------- */

@media (max-width: 720px) {
  .nav {
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
  }

  .nav-links {
    flex-wrap: wrap;
    width: 100%;
    row-gap: 10px;
    column-gap: 14px;
  }

  .nav-links a {
    font-size: 13px;
  }

  .hero {
    margin: 24px 16px;
    padding: 40px 24px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .stats {
    grid-template-columns: 1fr;
    row-gap: 24px;
  }

  .games-grid,
  .team-grid {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }

  .platforms {
    flex-direction: column;
    padding: 0 16px;
  }

  .platform-badge {
    min-width: 0;
  }

  .contact,
  .team,
  .about {
    padding: 0 16px;
  }

  .legal {
    margin: 24px 16px;
    padding: 32px 24px;
  }
}
