/* Mellstroy Game — мобильный информационный лендинг */

:root {
  --bg-deep: #07050d;
  --bg-card: rgba(22, 18, 34, 0.72);
  --bg-card-border: rgba(168, 120, 255, 0.18);
  --text: rgba(245, 242, 255, 0.94);
  --text-muted: rgba(200, 192, 220, 0.78);
  --accent-a: #a78bfa;
  --accent-b: #22d3ee;
  --accent-glow: rgba(34, 211, 238, 0.22);
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 16px;
  --radius-sm: 12px;
  --header-h: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: clamp(1rem, 0.95rem + 0.35vw, 1.0625rem);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
}

/* Фон: глубокий градиент + сетка «цифровой среды» + лёгкий шум */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 80% at 50% -15%, rgba(124, 58, 237, 0.38), transparent 55%),
    radial-gradient(90% 60% at 110% 40%, rgba(6, 182, 212, 0.18), transparent 45%),
    radial-gradient(70% 50% at -10% 70%, rgba(236, 72, 153, 0.12), transparent 50%),
    linear-gradient(175deg, #0a0614 0%, #100b18 38%, #08060f 100%);
  pointer-events: none;
}

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: float 18s ease-in-out infinite;
}

.orb-a {
  width: min(420px, 90vw);
  height: min(420px, 90vw);
  top: -8%;
  left: -15%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.55), transparent 70%);
  animation-delay: -4s;
}

.orb-b {
  width: min(360px, 85vw);
  height: min(360px, 85vw);
  bottom: 5%;
  right: -20%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.35), transparent 70%);
  animation-delay: -9s;
}

.orb-c {
  width: 280px;
  height: 280px;
  top: 45%;
  left: 40%;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.2), transparent 70%);
  animation-delay: -2s;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(4%, -3%) scale(1.04);
  }
  66% {
    transform: translate(-3%, 4%) scale(0.98);
  }
}

/* Шапка — sticky */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px calc(10px + env(safe-area-inset-top, 0));
  min-height: var(--header-h);
  background: linear-gradient(180deg, rgba(7, 5, 13, 0.92) 0%, rgba(7, 5, 13, 0.78) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  padding: 2px;
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.25), rgba(34, 211, 238, 0.12));
  border: 1px solid var(--bg-card-border);
  border-radius: 10px;
  box-shadow: 0 0 24px var(--accent-glow);
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text {
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  background: linear-gradient(90deg, var(--text), var(--accent-a));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.play-cta {
  flex-shrink: 0;
  padding: 10px 18px;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: #0a0614;
  background: linear-gradient(135deg, var(--accent-b), var(--accent-a));
  border-radius: 999px;
  border: none;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.play-cta:hover,
.play-cta:focus-visible {
  filter: brightness(1.08);
  box-shadow: 0 6px 28px rgba(34, 211, 238, 0.35);
  outline: none;
}

.play-cta:active {
  transform: scale(0.98);
}

.main {
  padding: 20px 16px 32px;
  padding-bottom: calc(32px + var(--safe-bottom));
  max-width: 720px;
  margin: 0 auto;
}

.article {
  position: relative;
}

.article::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 0;
  border-radius: calc(var(--radius) + 4px);
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 24px,
      rgba(255, 255, 255, 0.02) 24px,
      rgba(255, 255, 255, 0.02) 25px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 24px,
      rgba(255, 255, 255, 0.02) 24px,
      rgba(255, 255, 255, 0.02) 25px
    );
  opacity: 0.35;
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.15));
}

.hero {
  position: relative;
  z-index: 1;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-b);
}

.hero-media-link {
  display: block;
  margin: 0 0 18px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  background: rgba(0, 0, 0, 0.25);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.hero-media-link:hover,
.hero-media-link:focus-visible {
  box-shadow: 0 20px 48px rgba(34, 211, 238, 0.12), 0 16px 40px rgba(0, 0, 0, 0.5);
  outline: none;
}

.hero-media-link:focus-visible {
  outline: 2px solid var(--accent-b);
  outline-offset: 3px;
}

.hero-media-link:active {
  transform: scale(0.995);
}

.hero-media {
  display: block;
  margin: 0;
}

.hero-media img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.hero-cta {
  margin: 0 0 18px;
  text-align: center;
}

.play-cta--block {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 340px;
  box-sizing: border-box;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.65rem, 1.35rem + 2.2vw, 2.15rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.section {
  position: relative;
  z-index: 1;
  margin-bottom: 28px;
  padding: 20px 18px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.section h2 {
  margin: 0 0 14px;
  font-size: clamp(1.2rem, 1.05rem + 0.8vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section h3 {
  margin: 22px 0 10px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(255, 252, 255, 0.95);
}

.section h3:first-of-type {
  margin-top: 18px;
}

.prose p {
  margin: 0 0 14px;
  color: var(--text-muted);
}

.prose p:last-child {
  margin-bottom: 0;
}

.checklist {
  margin: 12px 0 16px;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 28px;
  color: var(--text-muted);
}

.checklist li:last-child {
  margin-bottom: 0;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  box-shadow: 0 0 12px var(--accent-glow);
}

.steps {
  margin: 12px 0 16px;
  padding-left: 1.25rem;
  color: var(--text-muted);
}

.steps li {
  margin-bottom: 8px;
  padding-left: 4px;
}

.steps li::marker {
  color: var(--accent-a);
  font-weight: 600;
}

.table-scroll {
  margin: 18px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.data-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table.compact {
  min-width: 320px;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.data-table th {
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-a);
  background: rgba(167, 139, 250, 0.08);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table td {
  color: var(--text-muted);
}

.data-table td:first-child {
  color: rgba(245, 242, 255, 0.88);
  font-weight: 500;
}

.highlight-card {
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.12), rgba(22, 22, 34, 0.75));
  border-color: rgba(167, 139, 250, 0.28);
}

.faq .faq-item {
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.faq .faq-item:last-child {
  margin-bottom: 0;
}

.faq summary {
  padding: 14px 16px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent-b);
  transition: transform 0.2s;
}

.faq .faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq .faq-item p {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.site-footer {
  max-width: 720px;
  margin: 8px auto 0;
  padding: 0 16px 24px;
  padding-bottom: calc(24px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(180, 175, 200, 0.65);
}

.to-top {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent-b);
  text-decoration: none;
  padding: 6px 0;
}

.to-top:hover,
.to-top:focus-visible {
  text-decoration: underline;
  outline: none;
}

@media (min-width: 600px) {
  .site-header {
    padding-left: 24px;
    padding-right: 24px;
  }

  .main {
    padding-left: 24px;
    padding-right: 24px;
  }

  .section {
    padding: 24px 22px;
  }

  .data-table {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .orb {
    animation: none;
  }

  .hero-media-link {
    transition: none;
  }

  .hero-media-link:active {
    transform: none;
  }
}
