/* Лендинг Мафиума: одна страница, та же гарнитура и цвета, что у приложения — человек видит лендинг, потом демо,
   и понимает, что это один продукт. Своих шрифтов с чужих серверов нет (CSP сайта — только свои источники). */
@font-face { font-family: "Plex"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Plex"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Plex"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Plex"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Plex"; font-weight: 700; font-display: swap; src: url(fonts/ibm-plex-sans-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Plex"; font-weight: 700; font-display: swap; src: url(fonts/ibm-plex-sans-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Plex Mono"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0400-045F; }
@font-face { font-family: "Plex Mono"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF; }

:root {
  --bg: #15131d;          /* вечер в клубе — фон приложения */
  --panel: #1d1a28;
  --line: #2e2a41;
  --ink: #f1edf8;
  --muted: #a8a1ba;
  --brand: #a98bd9;       /* фирменный цвет приложения */
  --brand-ink: #1b1526;
  --red: #e0535a;         /* красная команда */
  --gold: #e2bd55;        /* шериф */
  --max: 1120px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--ink); font: 400 17px/1.6 "Plex", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* шапка */
.top { position: sticky; top: 0; z-index: 10; background: rgba(21, 19, 29, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: .01em; }
.logo i { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-style: normal; font-size: 17px; }
.top nav { display: flex; align-items: center; gap: 22px; margin-left: auto; font-size: 15px; }
.top nav .btn { margin-left: 6px; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 10px; font: 600 16px/1 "Plex", sans-serif; text-decoration: none; border: 1px solid transparent; }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: #b99cdf; }
.btn.ghost { border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--muted); }
.top .btn { height: 40px; padding: 0 16px; font-size: 15px; }

/* первый экран: текст слева, справа — сам продукт: рейтинг на ноутбуке и живая игра на телефоне */
.hero { padding: 72px 0 88px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(34px, 4.2vw, 50px); line-height: 1.06; letter-spacing: -.02em; margin: 0 0 22px; font-weight: 700; max-width: 17ch; }
.hero p.lead { font-size: 19px; color: var(--muted); margin: 0 0 32px; max-width: 34em; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .proof { margin: 30px 0 0; display: inline-flex; align-items: center; gap: 14px; padding: 8px 8px 8px 16px; border: 1px solid var(--line); border-radius: 12px; font-size: 15px; color: var(--muted); }
.hero .proof b { color: var(--ink); font-weight: 600; }
.btn.small { height: 34px; padding: 0 14px; font-size: 14px; border-radius: 8px; background: var(--panel); border-color: var(--line); color: var(--ink); }
.btn.small:hover { border-color: var(--brand); }
.screen { border-radius: 12px; border: 1px solid var(--line); overflow: hidden; background: var(--panel); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); }
.phone { border-radius: 34px; border: 7px solid #0d0c13; overflow: hidden; background: #0d0c13; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .85); }

/* ПК и телефон вместе: снимок на компьютере, поверх правого края — тот же сайт на телефоне.
   Телефон закрывает числовые колонки справа, а ники и заголовки слева остаются видны */
.pair { position: relative; padding: 0 16% 16% 0; }
.pair .phone { position: absolute; width: 30%; right: 0; bottom: 0; border-width: 5px; border-radius: 26px; }
/* два телефона уступом — где показывать нечего, кроме телефона (ведение игры) */
.phones { display: flex; justify-content: center; gap: 22px; }
.phones .phone { width: min(230px, 42%); }
.phones .phone + .phone { margin-top: 56px; }

/* разделы для организатора, судьи и игрока: текст и снимок, снимок чередуется слева/справа */
.who { padding: 88px 0; border-top: 1px solid var(--line); }
.who .wrap { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 60px; align-items: center; }
.who.flip .wrap { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.who.flip .wrap > :last-child { order: -1; }
.who h2 { font-size: clamp(30px, 3.6vw, 42px); line-height: 1.1; letter-spacing: -.015em; margin: 0 0 14px; }
.who p.lead { font-size: 19px; color: var(--muted); margin: 0 0 26px; max-width: 32em; }
.who ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.who li { position: relative; padding-left: 26px; }
.who li::before { content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--brand)); }

/* факты о сайте клуба — четыре коротких пункта в строку, без карточек */
.club { padding: 88px 0; border-top: 1px solid var(--line); }
.club h2 { font-size: clamp(30px, 3.6vw, 42px); line-height: 1.1; letter-spacing: -.015em; margin: 0 0 32px; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.facts li { border-top: 2px solid var(--brand); padding-top: 16px; }
.facts b { display: block; font-size: 19px; margin-bottom: 6px; }
.facts span { color: var(--muted); }

/* подключение — три шага на дорожке: линия прорисовывается, точки загораются по очереди */
.steps { padding: 96px 0; border-top: 1px solid var(--line); }
.steps-head { max-width: 40em; margin-bottom: 48px; }
.steps h2, .demo h2, .contacts h2 { font-size: clamp(30px, 3.6vw, 42px); line-height: 1.1; letter-spacing: -.015em; margin: 0 0 14px; }
.steps-head .lead { font-size: 19px; color: var(--muted); margin: 0; }
.track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; position: relative; }
.track::before { content: ""; position: absolute; left: 8px; right: 8px; top: 8px; height: 2px; background: linear-gradient(90deg, var(--brand), rgba(169, 139, 217, .25)); transform-origin: left; }
.track li { position: relative; padding-top: 36px; }
.track .dot { position: absolute; top: 0; left: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 2px solid var(--brand); box-shadow: 0 0 0 6px var(--bg); }
.track li:first-child .dot { background: var(--brand); }
.track b { display: block; font-size: 21px; margin-bottom: 8px; }
.track p { margin: 0 0 12px; color: var(--muted); }
.track small { display: inline-block; font-size: 13px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; }
.offer { margin-top: 56px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 24px 28px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.offer b { display: block; font-size: 20px; margin-bottom: 4px; }
.offer span { color: var(--muted); }

.demo { padding: 88px 0; background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.demo .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) auto; gap: 40px; align-items: center; }
.demo h2 { margin-bottom: 14px; }
.demo p { color: var(--muted); margin: 0; max-width: 36em; font-size: 18px; }
.demo .roles { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; font-size: 15px; }
.demo .roles { gap: 10px; }
.demo .roles a { border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; color: var(--ink); text-decoration: none; font-weight: 600; transition: border-color .2s, background .2s; }
.demo .roles a:hover { border-color: var(--brand); background: rgba(169, 139, 217, .12); }

.contacts { padding: 88px 0 72px; }
.contacts .list { display: flex; gap: 48px; flex-wrap: wrap; }
.contacts .item span { display: block; color: var(--muted); font-size: 15px; margin-bottom: 4px; }
.contacts .item a { font-size: 24px; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); }
.contacts .item a:hover { border-color: var(--brand); }

footer { border-top: 1px solid var(--line); padding: 26px 0 36px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; }

/* появление при прокрутке */
.motion [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.motion [data-reveal].in { opacity: 1; transform: none; }
.motion [data-reveal-group] > * { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.motion [data-reveal-group].in > * { opacity: 1; transform: none; }
.motion .pair[data-reveal] .phone { opacity: 0; transform: translate(24px, 40px); transition: opacity .8s ease .25s, transform .9s cubic-bezier(.2, .7, .2, 1) .25s; }
.motion .pair[data-reveal].in .phone { opacity: 1; transform: none; transition: opacity .8s ease .25s, transform .9s cubic-bezier(.2, .7, .2, 1) .25s; }
.motion .phones[data-reveal] .phone + .phone { transition: transform .9s cubic-bezier(.2, .7, .2, 1) .2s; }
.motion .phones[data-reveal]:not(.in) .phone + .phone { transform: translateY(40px); }
.motion .track::before { transform: scaleX(0); transition: transform 1.2s cubic-bezier(.6, 0, .2, 1) .1s; }
.motion .track.in::before { transform: scaleX(1); }
.motion .track > li { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.motion .track.in > li { opacity: 1; transform: none; }
.motion .hero .wrap > div:first-child > * { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.motion .hero.in .wrap > div:first-child > * { opacity: 1; transform: none; }
.motion .hero .wrap > div:first-child > :nth-child(2) { transition-delay: .08s; }
.motion .hero .wrap > div:first-child > :nth-child(3) { transition-delay: .16s; }
.motion .hero .wrap > div:first-child > :nth-child(4) { transition-delay: .24s; }
.motion .hero .pair .screen { opacity: 0; transform: translateY(24px) scale(.98); transition: opacity .9s ease .15s, transform 1s cubic-bezier(.2, .7, .2, 1) .15s; }
.motion .hero.in .pair .screen { opacity: 1; transform: none; }
.motion .hero .pair .phone { opacity: 0; transform: translate(30px, 50px); transition: opacity .9s ease .45s, transform 1s cubic-bezier(.2, .7, .2, 1) .45s; }
.motion .hero.in .pair .phone { opacity: 1; transform: none; }
.btn { transition: background .2s, border-color .2s, transform .2s; }
.btn.primary:hover { transform: translateY(-1px); }

/* политика */
.doc { max-width: 720px; margin: 0 auto; padding: 56px 24px 72px; }
.doc h1 { font-size: 34px; line-height: 1.15; margin: 0 0 10px; }
.doc h2 { font-size: 21px; margin: 32px 0 8px; }
.doc p, .doc li { color: #d9d3e6; }
.doc .muted { color: var(--muted); }

@media (max-width: 900px) {
  .top nav a:not(.btn) { display: none; }
  .hero { padding: 40px 0 56px; }
  .hero .wrap, .who .wrap, .demo .wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .who.flip .wrap { grid-template-columns: minmax(0, 1fr); }
  .who.flip .wrap > :last-child { order: 0; }
  .pair { padding: 0 20% 26% 0; }
  .pair .phone { width: 38%; border-width: 4px; border-radius: 20px; }
  .club { padding: 56px 0; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 18px; }
  .who, .steps, .demo, .contacts { padding: 56px 0; }
  .track { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-left: 34px; }
  .track::before { left: 8px; right: auto; top: 8px; bottom: 8px; width: 2px; height: auto; background: linear-gradient(180deg, var(--brand), rgba(169, 139, 217, .25)); transform-origin: top; }
  .motion .track::before { transform: scaleY(0); }
  .motion .track.in::before { transform: scaleY(1); }
  .track li { padding-top: 0; }
  .track .dot { left: -34px; }
  .offer { padding: 20px; }
  .offer .btn { flex: 1 1 100%; }
  .hero .proof { display: flex; justify-content: space-between; }
  .contacts .item a { font-size: 21px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .top .wrap { gap: 12px; }
  .hero .cta .btn { flex: 1 1 100%; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .phones .phone + .phone { margin-top: 40px; }
}
