/* Zloy Chess 3D — промо-сайт. Тёмная монохромная база, один акцент — кровавый красный zloy.net.
   Гарнитуры: Unbounded (заголовки, файлом) и системная гротеск (текст). */

@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('fonts/unbounded-cyr.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('fonts/unbounded-lat.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #07070a;
  --bg-2: #0d0d12;
  --bg-3: #131318;
  --ink: #f3efe6;
  --ink-dim: rgba(243, 239, 230, 0.62);
  --ink-mute: rgba(243, 239, 230, 0.38);
  --line: rgba(243, 239, 230, 0.12);
  --line-strong: rgba(243, 239, 230, 0.24);
  --red: #ff3b30;
  --red-hot: #ff5a4e;
  --red-deep: #8f130c;
  --red-glow: rgba(255, 59, 48, 0.35);
  --display: 'Unbounded', 'Arial Black', 'Helvetica Neue', Arial, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  --pad: clamp(20px, 5vw, 72px);
  --container: 1240px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-hard: cubic-bezier(0.7, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: -0.01em; line-height: 1.02; overflow-wrap: normal; hyphens: manual; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ——— Фоновые слои: градиент, свечение и зерно ——— */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(70% 55% at 62% 42%, rgba(255, 59, 48, 0.16) 0%, rgba(255, 59, 48, 0.05) 38%, rgba(0, 0, 0, 0) 70%),
    radial-gradient(120% 90% at 50% 100%, #101014 0%, var(--bg) 60%);
}
.grain {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: url('img/grain.png') repeat;
  background-size: 256px 256px;
  opacity: 0.55;
  mix-blend-mode: overlay;
}

/* ——— Сцена: фиксированный холст за контентом ——— */
.stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.6s var(--ease);
}
.stage canvas { width: 100%; height: 100%; }
.stage.is-off { opacity: 0; }
.poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 45%;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.stage.is-poster .poster { opacity: 1; }
.stage.is-poster canvas { display: none; }

/* ——— Шапка ——— */
.top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--pad);
  background: linear-gradient(180deg, rgba(7, 7, 10, 0.92) 0%, rgba(7, 7, 10, 0.55) 70%, rgba(7, 7, 10, 0) 100%);
}
.top::after {
  content: '';
  position: absolute;
  left: var(--pad); right: var(--pad); top: calc(var(--header-h) - 1px);
  height: 1px;
  background: linear-gradient(90deg, var(--red) 0%, var(--red) 18%, var(--line) 18%, var(--line) 100%);
  opacity: 0.9;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.wordmark__mark {
  width: 28px; height: 28px;
  flex: 0 0 auto;
}
.wordmark__tag {
  color: var(--ink-mute);
  font-family: var(--text);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.top__right { display: flex; align-items: center; gap: 12px; }
.lang {
  display: inline-flex;
  border: 1px solid var(--line-strong);
}
.lang a, .lang span {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  transition: color 0.2s, background 0.2s;
}
.lang a:hover { color: var(--ink); background: rgba(243, 239, 230, 0.06); }
.lang [aria-current] { color: var(--bg); background: var(--ink); }

/* ——— Кнопки ——— */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 30px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  border-radius: 2px;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.25s var(--ease-hard), box-shadow 0.25s, color 0.25s, border-color 0.25s;
  cursor: pointer;
}
.btn--primary {
  color: #fff;
  background: var(--red);
  box-shadow: 0 10px 40px -8px var(--red-glow), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #fff;
  transform: translateX(-104%) skewX(-18deg);
  transition: transform 0.35s var(--ease-hard);
}
.btn--primary:hover { color: var(--bg); transform: translateY(-2px); box-shadow: 0 18px 50px -10px var(--red-glow); }
.btn--primary:hover::before { transform: translateX(0) skewX(-18deg) scaleX(1.3); }
.btn--primary:active { transform: translateY(0); }
.btn--ghost {
  color: var(--ink);
  border-color: var(--line-strong);
  background: rgba(7, 7, 10, 0.4);
}
.btn--ghost:hover { border-color: var(--ink); background: rgba(243, 239, 230, 0.06); transform: translateY(-2px); }
.btn--small { min-height: 42px; padding: 0 18px; font-size: 13px; }
.btn__arrow { width: 16px; height: 16px; flex: 0 0 auto; }

/* ——— Общая сетка секций ——— */
.section {
  position: relative;
  z-index: 2;
  padding: clamp(72px, 9vh, 120px) var(--pad);
}
.section--solid { background: var(--bg); }
.wrap { width: 100%; max-width: var(--container); margin: 0 auto; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}
.eyebrow::before {
  content: '';
  width: 28px; height: 2px;
  background: var(--red);
  transform: skewX(-30deg);
}
.h2 { font-size: clamp(30px, 5vw, 62px); max-width: 16ch; }
.lead { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5; color: var(--ink-dim); max-width: 56ch; }

/* ——— Hero ——— */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: grid;
  align-items: end;
  padding: calc(var(--header-h) + 48px) var(--pad) clamp(40px, 8vh, 96px);
}
.hero__inner { position: relative; max-width: 920px; }
.hero__inner::before {
  content: '';
  position: absolute;
  inset: -60px -120px -60px -140px;
  z-index: -1;
  background: radial-gradient(closest-side at 38% 55%, rgba(7, 7, 10, 0.8) 0%, rgba(7, 7, 10, 0.45) 55%, rgba(7, 7, 10, 0) 100%);
  pointer-events: none;
}
.hero__brand {
  margin: 0 0 18px;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(12px, 1.1vw, 14px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
}
.hero__title {
  font-size: clamp(40px, 6.6vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.03em;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.hero__title em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 2px var(--ink);
}
.hero__hook {
  margin: 26px 0 0;
  max-width: 44ch;
  font-size: clamp(17px, 1.7vw, 22px);
  line-height: 1.45;
  color: var(--ink-dim);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}
.hero__hook strong { color: var(--ink); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__note {
  margin-top: 22px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}
.hero__scroll {
  position: absolute;
  right: var(--pad);
  bottom: clamp(40px, 8vh, 96px);
  display: none;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  writing-mode: vertical-rl;
}
.hero__scroll::after {
  content: '';
  width: 1px; height: 64px;
  background: linear-gradient(180deg, var(--red), transparent);
}
@media (min-width: 960px) { .hero__scroll { display: flex; } }

/* ——— Сюжет: шаги под фиксированной сценой ——— */
.story {
  position: relative;
  z-index: 2;
  padding: 0 var(--pad);
}
.story__step {
  min-height: 92vh;
  display: grid;
  align-items: center;
  max-width: var(--container);
  margin: 0 auto;
}
.story__card {
  max-width: 440px;
  padding: 30px 30px 34px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  background: rgba(7, 7, 10, 0.72);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
}
.story__step:nth-child(even) .story__card { justify-self: end; }
.story__num {
  display: block;
  margin-bottom: 18px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--red);
}
.story__title { font-size: clamp(26px, 3vw, 38px); margin-bottom: 14px; }
.story__text { color: var(--ink-dim); font-size: 16px; line-height: 1.55; }
.story__text strong { color: var(--ink); font-weight: 600; }

/* ——— Механики ——— */
.mech { border-top: 1px solid var(--line); }
.mech__head { display: grid; gap: 22px; margin-bottom: clamp(40px, 6vh, 72px); }
@media (min-width: 900px) { .mech__head { grid-template-columns: 1.1fr 1fr; align-items: end; } }
.cards {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, 1fr); } }
.card {
  position: relative;
  padding: clamp(26px, 3vw, 40px);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-2);
  overflow: hidden;
  transition: background 0.3s;
}
.card:hover { background: var(--bg-3); }
.card::after {
  content: '';
  position: absolute;
  right: -30px; top: -30px;
  width: 140px; height: 140px;
  background:
    linear-gradient(45deg, transparent 47%, var(--red) 47%, var(--red) 53%, transparent 53%),
    linear-gradient(-45deg, transparent 47%, var(--red) 47%, var(--red) 53%, transparent 53%);
  opacity: 0.08;
  transform: rotate(0deg);
  transition: opacity 0.3s, transform 0.5s var(--ease-hard);
}
.card:hover::after { opacity: 0.35; transform: rotate(90deg); }
.card__num {
  font-family: var(--display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--red);
}
.card__title { font-size: clamp(20px, 2vw, 26px); line-height: 1.1; }
.card__text { color: var(--ink-dim); font-size: 15px; line-height: 1.55; flex: 1; }
.card__icon { width: 44px; height: 44px; color: var(--ink); }
.specs {
  display: grid;
  gap: 0;
  margin-top: 1px;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--bg);
}
@media (min-width: 720px) { .specs { grid-template-columns: repeat(3, 1fr); } }
.specs li {
  padding: 18px 22px;
  font-size: 14px;
  color: var(--ink-dim);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 720px) { .specs li { border-bottom: 0; border-right: 1px solid var(--line); } .specs li:last-child { border-right: 0; } }
.specs b { display: block; margin-bottom: 4px; color: var(--ink); font-weight: 600; }

/* ——— Кадры ——— */
.shots__head { display: grid; gap: 22px; margin-bottom: clamp(32px, 5vh, 56px); }
@media (min-width: 900px) { .shots__head { grid-template-columns: 1fr 1fr; align-items: end; } }
.gallery {
  display: grid;
  gap: 18px;
}
/* Пропорции заданы на самих фигурах, картинки — абсолютно: ленивая загрузка не двигает раскладку. */
.shot {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
}
.shot--tall { aspect-ratio: 4 / 5; }
.shot img, .shot video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.shot--tall img { object-position: 50% 14%; }
.shot:hover img { transform: scale(1.03); }
@media (min-width: 760px) {
  .gallery { grid-template-columns: repeat(6, 1fr); }
  .gallery > :nth-child(1) { grid-column: span 4; }
  .gallery > :nth-child(2) { grid-column: span 2; aspect-ratio: auto; }
  .gallery > :nth-child(3) { grid-column: span 3; }
  .gallery > :nth-child(4) { grid-column: span 3; }
}
.shot figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 40px 18px 14px;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink-dim);
  background: linear-gradient(180deg, rgba(7, 7, 10, 0) 0%, rgba(7, 7, 10, 0.9) 100%);
}
.shot figcaption b { color: var(--ink); font-weight: 600; margin-right: 6px; }

/* ——— Из игры прямо сейчас ——— */
.live[hidden] { display: none; }
.live__grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.live__item {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
}
.live__item img, .live__item video { width: 100%; height: 100%; object-fit: cover; }
.live__item::after {
  content: '';
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 0 var(--red);
  transition: box-shadow 0.25s;
  pointer-events: none;
}
.live__item:hover::after { box-shadow: inset 0 0 0 2px var(--red); }
.live__badge {
  position: absolute;
  left: 10px; top: 10px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--red);
}

/* ——— Финальный призыв ——— */
.cta {
  position: relative;
  z-index: 2;
  min-height: 92vh;
  display: grid;
  align-items: center;
  padding: clamp(96px, 14vh, 200px) var(--pad);
  text-align: center;
  background:
    radial-gradient(60% 50% at 50% 55%, rgba(7, 7, 10, 0.55) 0%, rgba(7, 7, 10, 0) 100%),
    linear-gradient(180deg, var(--bg) 0%, rgba(7, 7, 10, 0.2) 26%, rgba(7, 7, 10, 0.2) 74%, var(--bg) 100%);
}
.cta__inner { max-width: 860px; margin: 0 auto; }
.cta__title {
  font-size: clamp(40px, 8vw, 112px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}
.cta__title em { font-style: normal; color: var(--red); }
.cta .lead { margin: 24px auto 0; }
.cta .actions { justify-content: center; }

/* ——— Появление блоков (только при включённом JS и без reduced-motion) ——— */
.js-anim .reveal { opacity: 0; transform: translateY(28px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-anim .reveal { opacity: 1; transform: none; }
  .btn, .shot img, .card::after { transition: none; }
}

@media (max-width: 720px) {
  :root { --header-h: 60px; }
  .wordmark__tag { display: none; }
  .hero { align-items: end; padding-top: 52vh; }
  .hero__title { font-size: clamp(34px, 10.4vw, 64px); }
  .hero__brand { letter-spacing: 0.14em; }
  .story__card { max-width: none; padding: 24px 22px 26px; }
  .story__step { min-height: 78vh; }
  .btn { width: 100%; }
  .actions { gap: 10px; }
  .top .btn--small { width: auto; min-height: 38px; padding: 0 14px; }
  .top { gap: 10px; }
  .top__right { gap: 8px; }
  .lang a, .lang span { padding: 7px 9px; }
}
@media (max-width: 480px) {
  .wordmark > span:not(.wordmark__tag) { display: none; }
  .bg { background:
    radial-gradient(90% 40% at 50% 28%, rgba(255, 59, 48, 0.18) 0%, rgba(255, 59, 48, 0.05) 45%, rgba(0, 0, 0, 0) 75%),
    radial-gradient(120% 90% at 50% 100%, #101014 0%, var(--bg) 60%); }
}
