/* ============================================================
   Running Empire — landing styles
   Палитра синхронизирована с apps/mobile/src/theme.ts
   ============================================================ */

:root {
  --bg-night: #040713;
  --surface-base: #0b152a;
  --surface-card: #101c36;
  --border-muted: rgba(99, 122, 168, 0.32);
  --border-glare: rgba(61, 182, 255, 0.45);
  --primary: #3dd6ff;
  --enemy: #ff7a45;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5f5;
  --text-muted: #94a3b8;
  --accent-green: #22c55e;
  --accent-yellow: #facc15;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --maxw: 1120px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg-night);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 760px; }

.grad {
  background: linear-gradient(100deg, var(--primary), #8be9ff 55%, var(--enemy));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: var(--bg-night);
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 1000;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 26px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-primary {
  background: var(--primary);
  color: var(--bg-night);
  box-shadow: 0 0 28px rgba(61, 214, 255, 0.45);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 36px rgba(61, 214, 255, 0.65); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(4, 7, 19, 0.78);
  border-bottom: 1px solid var(--border-muted);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
}
.brand img {
  filter: drop-shadow(0 0 10px rgba(250, 204, 21, 0.28));
}
.nav { display: flex; gap: 28px; }
.nav a { color: var(--text-secondary); font-size: 15px; font-weight: 500; transition: color 0.15s ease; }
.nav a:hover { color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 1px solid var(--border-muted);
  border-radius: 999px;
  padding: 7px 13px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.lang-switch:hover { color: var(--primary); border-color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 88px;
  background:
    radial-gradient(ellipse 70% 60% at 75% 25%, rgba(61, 214, 255, 0.16), transparent 60%),
    radial-gradient(ellipse 60% 60% at 15% 80%, rgba(255, 122, 69, 0.12), transparent 60%),
    linear-gradient(180deg, #040713, #081739 55%, #040713);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 18px;
}
.hero h1 { font-size: clamp(36px, 6vw, 60px); font-weight: 800; }
.lead {
  margin-top: 22px;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-secondary);
  max-width: 36em;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}
.store-badges--center { justify-content: center; }
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  border: 1px solid var(--border-glare);
  border-radius: var(--radius-md);
  background: rgba(16, 28, 54, 0.7);
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.store-badge:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 0 26px rgba(61, 214, 255, 0.3);
}
.store-badge__icon { color: var(--text-primary); display: flex; }
.store-badge__text { display: flex; flex-direction: column; line-height: 1.15; }
.store-badge__text small { font-size: 11px; color: var(--text-muted); }
.store-badge__text strong { font-size: 17px; }

.hero-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.hero-chips li {
  font-size: 14px;
  color: var(--text-secondary);
  background: rgba(16, 28, 54, 0.6);
  border: 1px solid var(--border-muted);
  padding: 8px 14px;
  border-radius: 999px;
}

.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art img {
  width: 100%;
  max-width: 440px;
  aspect-ratio: 4 / 5;
  height: auto;
  object-fit: cover;
  object-position: center 38%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glare);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(61, 214, 255, 0.18);
}
.hero-glow {
  position: absolute;
  inset: -10% -6% -10% -6%;
  background: radial-gradient(circle at 50% 45%, rgba(61, 214, 255, 0.28), transparent 62%);
  filter: blur(20px);
  z-index: 0;
}
.hero-art img { position: relative; z-index: 1; }

/* ---------- Stats strip ---------- */
.stats { border-top: 1px solid var(--border-muted); border-bottom: 1px solid var(--border-muted); background: var(--surface-base); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 36px 24px;
  text-align: center;
}
.stats-grid strong { display: block; font-size: 34px; font-weight: 800; color: var(--primary); }
.stats-grid span { font-size: 14px; color: var(--text-muted); }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--surface-base); border-top: 1px solid var(--border-muted); border-bottom: 1px solid var(--border-muted); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; margin-top: 10px; }
.section-sub { margin-top: 14px; color: var(--text-secondary); }
.muted { color: var(--text-muted); }

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}
.steps li {
  position: relative;
  background: var(--surface-card);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-lg);
  padding: 36px 28px 30px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(61, 214, 255, 0.14);
  border: 1px solid var(--border-glare);
  color: var(--primary);
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 18px;
}
.steps h3 { font-size: 20px; margin-bottom: 10px; }
.steps p { color: var(--text-secondary); font-size: 15px; }

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glare);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 30px rgba(61, 214, 255, 0.12);
}
.card-icon { font-size: 30px; margin-bottom: 16px; }
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--text-secondary); font-size: 15px; }

/* ---------- Progression ladder ---------- */
.ladder {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 60px;
}
.ladder span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-card);
  border: 1px solid var(--border-muted);
  padding: 9px 16px;
  border-radius: 999px;
}
.ladder .ladder-top {
  color: var(--bg-night);
  background: linear-gradient(100deg, var(--primary), var(--accent-yellow));
  border-color: transparent;
  box-shadow: 0 0 24px rgba(250, 204, 21, 0.45);
}

.crests { text-align: center; }
.crests h3 { font-size: 22px; margin-bottom: 26px; }
.crest-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 18px;
  max-width: 720px;
  margin: 0 auto 18px;
}
.crest-grid img {
  width: 100%;
  aspect-ratio: 1;
  padding: 14px;
  background: rgba(61, 214, 255, 0.06);
  border: 1px solid var(--border-glare);
  border-radius: var(--radius-md);
  filter: drop-shadow(0 0 8px rgba(61, 214, 255, 0.55));
  transition: transform 0.15s ease, filter 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.crest-grid img:hover {
  transform: translateY(-4px) scale(1.04);
  border-color: var(--primary);
  background: rgba(61, 214, 255, 0.12);
  filter: drop-shadow(0 0 16px rgba(61, 214, 255, 0.9)) brightness(1.15);
}

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center;
  padding: 84px 0;
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(61, 214, 255, 0.2), transparent 60%),
    linear-gradient(180deg, #050b1e, #040713);
  border-top: 1px solid var(--border-muted);
}
.cta-band h2 { font-size: clamp(28px, 4.5vw, 44px); font-weight: 800; }
.cta-band p { margin: 16px 0 30px; color: var(--text-secondary); font-size: 18px; }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details {
  background: var(--surface-card);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-md);
  padding: 4px 22px;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 17px;
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  color: var(--primary);
  font-size: 24px;
  font-weight: 400;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--text-secondary); font-size: 15px; }
.faq a { color: var(--primary); text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-night); border-top: 1px solid var(--border-muted); padding: 44px 0; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.footer-brand img {
  filter: drop-shadow(0 0 8px rgba(250, 204, 21, 0.22));
}
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { color: var(--text-muted); font-size: 14px; transition: color 0.15s ease; }
.footer-links a:hover { color: var(--primary); }
.footer-copy { width: 100%; color: var(--text-muted); font-size: 13px; border-top: 1px solid var(--border-muted); padding-top: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-copy .eyebrow { margin-top: 8px; }
  .lead { margin-left: auto; margin-right: auto; }
  .store-badges, .hero-chips { justify-content: center; }
  .hero-art { order: -1; }
  .hero-art img { max-width: 380px; aspect-ratio: 1 / 1; }
  .nav { display: none; }
  .steps, .feature-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .crest-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .section { padding: 60px 0; }
  .hero { padding: 48px 0 64px; }
  .hero-art img { max-width: 300px; }
  .store-badge { flex: 1 1 100%; justify-content: center; }
  .footer-inner { flex-direction: column; align-items: flex-start; text-align: left; }
}

/* ---------- Legal pages (privacy / terms) ---------- */
.legal { padding: 56px 0 88px; }
.legal-head { max-width: 760px; margin: 0 auto 40px; }
.legal-head h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.legal-updated { margin-top: 12px; color: var(--text-muted); font-size: 14px; }
.legal-intro { margin-top: 16px; color: var(--text-secondary); }

.legal-toc {
  max-width: 760px;
  margin: 0 auto 40px;
  background: var(--surface-card);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-md);
  padding: 22px 26px;
}
.legal-toc h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); margin-bottom: 14px; }
.legal-toc ol { margin: 0; padding-left: 22px; display: grid; gap: 7px; }
.legal-toc a { color: var(--text-secondary); font-size: 15px; }
.legal-toc a:hover { color: var(--primary); }

.legal-body { max-width: 760px; margin: 0 auto; }
.legal-body section { margin-bottom: 36px; scroll-margin-top: 84px; }
.legal-body h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-muted);
}
.legal-body h3 { font-size: 17px; font-weight: 600; margin: 18px 0 8px; }
.legal-body p { color: var(--text-secondary); margin-bottom: 12px; }
.legal-body ul { color: var(--text-secondary); margin: 0 0 12px; padding-left: 22px; }
.legal-body li { margin-bottom: 6px; }
.legal-body a { color: var(--primary); text-decoration: underline; }
.legal-body strong { color: var(--text-primary); }

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--primary);
  font-weight: 600;
  font-size: 15px;
}

/* ---------- "Скоро" toast для Google Play ---------- */
.store-badge.js-soon { cursor: pointer; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 120%);
  z-index: 1000;
  max-width: calc(100vw - 32px);
  padding: 14px 22px;
  border-radius: 999px;
  background: rgba(16, 28, 54, 0.96);
  border: 1px solid rgba(250, 204, 21, 0.45);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 22px rgba(250, 204, 21, 0.18);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s ease;
}
.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}
@media (max-width: 520px) {
  .toast { white-space: normal; text-align: center; }
}
