/* mellstroygamecore.ru — mobile-first */
:root {
  --bg: #0f1419;
  --surface: #151c26;
  --elevated: #1a2332;
  --border: #2a3f5f;
  --text: #e8eef5;
  --muted: #8b9cb3;
  --accent: #3d7eef;
  --accent2: #5ad4a8;
  --danger: #e07070;
  --radius: 12px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

.wrap {
  width: min(1100px, 100% - 2rem);
  margin-inline: auto;
}

h1,
h2,
h3 {
  line-height: 1.25;
  font-weight: 600;
}

h1 {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
}

h2 {
  font-size: 1.35rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.1rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #6b9fff;
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

code {
  font-size: 0.9em;
  background: var(--elevated);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.875rem;
}

.eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent2);
  margin: 0 0 0.5rem;
}

.lead {
  font-size: 1.05rem;
  color: #c8d4e0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 20, 25, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  max-width: 1100px;
  margin: 0 auto;
  width: min(1100px, 100% - 2rem);
}

.logo {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  color: #fff;
}

.nav-toggle {
  display: none;
  background: var(--elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.site-nav a:not(.btn) {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:not(.btn):hover {
  color: var(--text);
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #2d5fc4);
  color: #fff;
}

.btn--primary:hover {
  color: #fff;
  filter: brightness(1.08);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--muted);
  color: #fff;
}

.btn--small {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

/* Hero */
.hero {
  padding: 2rem 0 2.5rem;
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(61, 126, 239, 0.2), transparent);
}

.hero__inner {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr 280px;
    align-items: start;
  }
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.hero__cta-primary {
  margin: 0 0 1rem;
}

.hero__cta-primary .btn--primary {
  width: 100%;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  font-size: 1rem;
}

@media (min-width: 720px) {
  .hero__cta-primary .btn--primary {
    width: auto;
    min-width: 200px;
  }
}

.hero-visual {
  margin: 1rem 0 1rem;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  aspect-ratio: 380 / 280;
}

.hero-visual picture,
.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

@media (min-width: 720px) {
  .hero-visual {
    aspect-ratio: 960 / 320;
  }
}

@media (max-width: 719px) {
  .hero-visual {
    margin-inline: -0.25rem;
    border-radius: 10px;
  }
}

/* Layout */
.layout-split {
  display: grid;
  gap: 2rem;
  padding-bottom: 3rem;
}

@media (min-width: 900px) {
  .layout-split {
    grid-template-columns: 1fr 300px;
    align-items: start;
  }

  .cta-sidebar {
    position: sticky;
    top: 5rem;
  }
}

.content {
  min-width: 0;
}

.content section:first-child h2 {
  margin-top: 0;
}

.page-narrow .content--page {
  max-width: 720px;
}

.page-head {
  margin-bottom: 2rem;
}

/* CTA sidebar */
.cta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.cta-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

/* Infographics */
.figure-block {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.infographic {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 0.75rem;
}

/* Geo & tables */
.geo-blocks {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
}

@media (min-width: 640px) {
  .geo-blocks {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

.geo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.geo-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.table-scroll {
  overflow-x: auto;
  margin: 1rem 0;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th,
.data-table td {
  border: 1px solid var(--border);
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.data-table thead {
  background: var(--elevated);
}

.data-table tbody tr:nth-child(even) {
  background: rgba(26, 35, 50, 0.5);
}

/* Score card */
.score-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.score-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.score-card__value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent2);
}

.score-card__max {
  font-size: 1.25rem;
  color: var(--muted);
}

.score-radar {
  width: 100%;
  max-width: 400px;
  height: auto;
  margin: 0 auto;
  display: block;
}

.score-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.score-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.pros-cons {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 640px) {
  .pros-cons {
    grid-template-columns: 1fr 1fr;
  }
}

.pros-cons h3 {
  margin: 0 0 0.5rem;
}

.pros-cons ul {
  margin: 0;
}

.callout {
  background: rgba(61, 126, 239, 0.12);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}

.content-footer-cta {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--elevated);
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--border);
}

/* Author page */
.author-card {
  display: grid;
  gap: 1.5rem;
  align-items: start;
  margin: 1.5rem 0;
}

@media (min-width: 560px) {
  .author-card {
    grid-template-columns: 160px 1fr;
  }
}

.author-card__photo {
  display: block;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.author-links {
  margin-top: 1rem;
}

.page-cta {
  margin-top: 2rem;
}

.steps-list li {
  margin-bottom: 0.5rem;
}

.faq-block h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: auto;
  background: var(--surface);
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr 2fr;
  }
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-disclaimer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}
