/* Мафия Сити — промо-сайт. Тёмная база, один акцент: красный семьи. */

@font-face {
  font-family: "Prata";
  src: url("../fonts/prata-cyrillic-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Prata";
  src: url("../fonts/prata-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0b0a0d;
  --bg-2: #121015;
  --ink: #efe7da;
  --ink-2: #bdb4a6;
  --mute: #8a8276;
  --line: rgba(239, 231, 218, .12);
  --line-2: rgba(239, 231, 218, .22);
  --red: #e0323f;
  --red-hi: #ff5360;
  --red-deep: rgba(224, 50, 63, .16);
  --serif: "Prata", "Didot", "Bodoni 72", "Bodoni MT", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* тени — тёплые снизу (фонарь сверху), как в сцене */
  --shadow: 0 1px 0 rgba(255, 214, 160, .05) inset, 0 24px 60px -24px rgba(0, 0, 0, .9), 0 8px 18px -10px rgba(0, 0, 0, .7);
  --shadow-red: 0 10px 30px -8px rgba(224, 50, 63, .55), 0 2px 0 rgba(255, 255, 255, .12) inset;
  --r: 14px;
  --pad: clamp(20px, 5vw, 72px);
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font: 400 17px/1.6 var(--sans); background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red-hi); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 3D-слой: фиксирован позади контента ---------- */
.stage {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60vmax 50vmax at 68% 46%, rgba(255, 158, 80, .16), transparent 60%),
    radial-gradient(40vmax 30vmax at 70% 88%, rgba(224, 50, 63, .07), transparent 70%),
    linear-gradient(180deg, #0e0c10 0%, #0b0a0d 55%, #080709 100%);
  transition: opacity .8s ease;
}
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s ease; }
.stage.ready canvas { opacity: 1; }
/* без WebGL (или пока сцена грузится на слабом устройстве) — постер из игры */
.stage .poster {
  position: absolute; inset: 0; background: url("../img/poster.jpg") center / cover no-repeat;
  opacity: 0; transition: opacity 1s ease;
}
.stage .poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 10, 13, .92) 0%, rgba(11, 10, 13, .55) 55%, rgba(11, 10, 13, .35) 100%); }
.no-webgl .stage .poster { opacity: 1; }
.no-webgl .stage canvas { display: none; }
@media (max-width: 899px) {
  .stage { background:
    radial-gradient(90vmax 60vmax at 50% 40%, rgba(255, 158, 80, .15), transparent 60%),
    linear-gradient(180deg, #0e0c10 0%, #0b0a0d 60%, #080709 100%); }
  .stage .poster::after { background: linear-gradient(180deg, rgba(11, 10, 13, .45) 0%, rgba(11, 10, 13, .9) 70%); }
}

main, .top { position: relative; z-index: 1; }

/* ---------- шапка ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--pad);
  background: linear-gradient(180deg, rgba(11, 10, 13, .85), rgba(11, 10, 13, 0));
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--serif); font-size: 19px; letter-spacing: .02em; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.top-nav { display: flex; align-items: center; gap: 8px; }
.lang { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; }
.lang a, .lang span { font-size: 13px; letter-spacing: .06em; padding: 5px 11px; border-radius: 999px; text-decoration: none; color: var(--ink-2); }
.lang span[aria-current] { background: var(--ink); color: var(--bg); font-weight: 600; }
.lang a:hover { color: var(--ink); }
@media (max-width: 420px) { .brand span { font-size: 16px; } .top .btn.small { padding: 0 14px; } .lang a, .lang span { padding: 5px 9px; } }

/* ---------- кнопки ---------- */
.btn {
  --h: 56px;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: var(--h); padding: 0 30px; border-radius: 999px;
  font: 600 17px/1 var(--sans); letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), background-color .25s, border-color .25s, box-shadow .25s, color .25s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.play { background: var(--red); color: #fff; box-shadow: var(--shadow-red); }
.btn.play:hover { background: var(--red-hi); transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(224, 50, 63, .7), 0 2px 0 rgba(255, 255, 255, .14) inset; }
.btn.ghost { border-color: var(--line-2); color: var(--ink); background: rgba(11, 10, 13, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn.ghost:hover { border-color: var(--ink-2); transform: translateY(-2px); }
.btn.small { --h: 40px; padding: 0 18px; font-size: 14px; }
.btn.big { --h: 64px; padding: 0 40px; font-size: 19px; }
.btn:active { transform: translateY(0) scale(.98); }

/* ---------- общая типографика ---------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 22px; }
.kicker::before { content: ""; width: 26px; height: 1px; background: var(--red); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -.005em; }
h2 { font-size: clamp(34px, 5vw, 64px); line-height: 1.04; }
h3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 34em; }
em.red { font-style: normal; color: var(--red-hi); }

/* ---------- hero ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 90px; }
.hero .wrap { display: grid; }
.hero-copy { max-width: 600px; }
.hero h1 { font-size: clamp(64px, 11vw, 156px); line-height: .9; letter-spacing: -.02em; margin: 0 0 28px; }
.hero h1 span { display: block; }
.hero h1 .second { padding-left: .55em; color: transparent; -webkit-text-stroke: 1px rgba(239, 231, 218, .75); }
.hook { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.3; margin: 0 0 18px; }
.hero .lead { margin: 0 0 40px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 36px 0 0; padding: 0; list-style: none; color: var(--mute); font-size: 14px; }
.hero-meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--red); }
.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); width: 1px; height: 54px; background: linear-gradient(var(--ink-2), transparent); opacity: .5; }
@media (max-width: 899px) {
  .hero { align-items: flex-end; padding-bottom: 72px; }
  .hero-copy { padding-top: 42vh; }
  .hero .lead { font-size: 16px; margin-bottom: 28px; }
  .hero h1 .second { padding-left: .3em; }
  .scroll-cue { display: none; }
}

/* ---------- скролл-история (сцена справа/позади, текст слева) ---------- */
.story { position: relative; }
.story-step { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 12vh 0; }
.story-step .wrap { display: flex; justify-content: flex-end; }
.step-card {
  width: min(470px, 100%); padding: 34px 34px 30px; border-radius: var(--r);
  background: linear-gradient(180deg, rgba(20, 17, 22, .78), rgba(12, 11, 14, .86));
  border: 1px solid var(--line); box-shadow: var(--shadow);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.step-no { font-family: var(--serif); font-size: 15px; color: var(--red-hi); letter-spacing: .1em; margin: 0 0 16px; display: block; }
.step-card h2 { font-size: clamp(32px, 3.6vw, 46px); margin: 0 0 16px; }
.step-card p { color: var(--ink-2); margin: 0 0 14px; }
.step-card p:last-child { margin-bottom: 0; }
.chat { list-style: none; margin: 20px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: 15px; }
.chat li { display: grid; gap: 2px; }
.chat b { font-weight: 600; font-size: 13px; color: var(--ink); letter-spacing: .02em; }
.chat b small { font-weight: 400; color: var(--mute); margin-left: 6px; }
.chat q { quotes: none; color: var(--ink-2); }
.roles { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.roles li { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.roles li strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 17px; color: var(--ink); margin-bottom: 2px; }
.roles li.mafia { border-color: rgba(224, 50, 63, .45); background: var(--red-deep); }
.roles li.mafia strong { color: var(--red-hi); }
@media (max-width: 899px) {
  .story-step { align-items: flex-end; padding: 40vh 0 8vh; }
  .story-step .wrap { justify-content: center; }
  .step-card { padding: 26px 22px 22px; }
}

/* ---------- непрозрачные секции поверх сцены ---------- */
.solid { position: relative; background: var(--bg); }
.solid::before { content: ""; position: absolute; left: 0; right: 0; top: -140px; height: 140px; background: linear-gradient(180deg, rgba(11, 10, 13, 0), var(--bg)); pointer-events: none; }
.section { padding: clamp(80px, 12vw, 150px) 0; }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(40px, 6vw, 72px); max-width: 760px; }

/* механики */
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  position: relative; padding: 30px 28px 30px; border-radius: var(--r); background: var(--bg-2);
  border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .35s;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-2); }
.card::after { content: ""; position: absolute; left: 28px; right: 28px; top: 0; height: 1px; background: linear-gradient(90deg, var(--red), transparent); opacity: .7; }
.card .ico { width: 44px; height: 44px; margin-bottom: 26px; color: var(--red-hi); }
.card h3 { margin: 0 0 12px; }
.card p { margin: 0; color: var(--ink-2); font-size: 16px; }

/* кадры из игры */
.shots { display: grid; gap: 18px; grid-template-columns: repeat(12, 1fr); }
.shot { margin: 0; grid-column: span 6; }
.shot.wide { grid-column: span 12; }
.shot .frame { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #000; aspect-ratio: 16 / 9; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.shot:hover img { transform: scale(1.025); }
.shot figcaption { margin-top: 12px; color: var(--mute); font-size: 14px; }
@media (max-width: 760px) { .shot, .shot.wide { grid-column: span 12; } }

/* живые кадры игроков */
.live[hidden] { display: none; }
.live-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 34px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 10px; box-shadow: 0 0 0 0 rgba(224, 50, 63, .6); animation: pulse 2s infinite; vertical-align: middle; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(224, 50, 63, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 50, 63, 0); } }
.live-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.live-grid a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3; background: var(--bg-2); position: relative; }
.live-grid img, .live-grid video { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.live-grid a:hover img, .live-grid a:hover video { transform: scale(1.04); }
.live-grid .is-video::after { content: ""; position: absolute; right: 10px; top: 10px; width: 0; height: 0; border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .8)); }

/* финальный CTA: сцена снова видна */
.final { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; text-align: center; padding: 120px 0; }
.final .wrap { display: grid; justify-items: center; gap: 26px; }
.final h2 { font-size: clamp(44px, 7vw, 104px); max-width: 12ch; }
.final .lead { margin: 0 auto; text-align: center; }
.final .cta-row { justify-content: center; margin-top: 8px; }
.final-glass { padding: clamp(28px, 5vw, 56px); border-radius: 24px; background: radial-gradient(closest-side, rgba(11, 10, 13, .72), rgba(11, 10, 13, 0)); }

/* появление при скролле */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
