@font-face {
  font-family: "Russo One"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/russo-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Russo One"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/russo-lat.woff2") format("woff2");
  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;
}
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/onest-cyrillic-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/onest-latin-wght-normal.woff2") format("woff2-variations");
  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: #05070b;
  --bg-2: #0a0e16;
  --line: rgba(160, 180, 220, .12);
  --ink: #eceff5;
  --mut: #8e98aa;
  --dim: #566074;
  --red: #ff3b30;
  --red-2: #ff6a5f;
  --red-glow: rgba(255, 59, 48, .42);
  --fd: "Russo One", "Arial Black", system-ui, sans-serif;
  --fb: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Тени согласованы со сценой: холодная ночь снизу, красный контровой свет. */
  --shadow-card: 0 30px 60px -30px rgba(0, 0, 0, .9), 0 0 0 1px var(--line);
  --shadow-cta: 0 14px 40px -10px var(--red-glow), 0 2px 0 rgba(255, 255, 255, .12) inset;
  --pad: clamp(20px, 5vw, 72px);
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font-family: var(--fb); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--fd); font-weight: 400; line-height: 1.02; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; border-radius: 4px; }

/* ——— Фон и сцена ——— */
.backdrop {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60vmax 50vmax at 70% 42%, rgba(255, 196, 140, .07), transparent 60%),
    radial-gradient(40vmax 34vmax at 68% 60%, rgba(255, 59, 48, .10), transparent 65%),
    radial-gradient(80vmax 60vmax at 20% 0%, rgba(60, 90, 150, .16), transparent 60%),
    linear-gradient(180deg, #070a11 0%, var(--bg) 60%);
}
#stage {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; display: block;
  opacity: 0; transition: opacity .9s ease;
}
.webgl-ready #stage { opacity: 1; }
.webgl-ready.stage-off #stage { opacity: 0; }
.no-webgl #stage { display: none; }
/* Без WebGL — постер-кадр из игры за hero. */
.hero-poster { display: none; }
.no-webgl .hero-poster {
  display: block; position: absolute; inset: 0; z-index: -1; overflow: hidden;
}
.no-webgl .hero-poster img { width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.no-webgl .hero-poster::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--bg) 10%, rgba(5, 7, 11, .5) 60%, rgba(5, 7, 11, .2)), linear-gradient(0deg, var(--bg), transparent 40%);
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* ——— Шапка ——— */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--pad); transition: background .3s, backdrop-filter .3s, padding .3s;
}
.top.scrolled { background: rgba(5, 7, 11, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.brand { font-family: var(--fd); font-size: 18px; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 10px; height: 10px; background: var(--red); transform: rotate(45deg); box-shadow: 0 0 14px var(--red-glow); }
.top-right { display: flex; align-items: center; gap: 14px; }
.lang { display: flex; gap: 2px; font-size: 13px; font-weight: 600; letter-spacing: .08em; }
.lang a, .lang span { padding: 6px 9px; border-radius: 6px; text-decoration: none; color: var(--mut); }
.lang span { color: var(--ink); background: rgba(255, 255, 255, .06); }
.lang a:hover { color: var(--ink); }

/* ——— Кнопки ——— */
.btn {
  --h: 56px;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: var(--h); padding: 0 28px; border-radius: 999px; text-decoration: none;
  font-family: var(--fb); font-weight: 700; font-size: 17px; letter-spacing: .01em; white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s;
}
.btn-play { background: var(--red); color: #fff; box-shadow: var(--shadow-cta); }
.btn-play:hover { transform: translateY(-2px); background: #ff4d42; box-shadow: 0 20px 50px -10px rgba(255, 59, 48, .6), 0 2px 0 rgba(255, 255, 255, .14) inset; }
.btn-play svg { width: 14px; height: 14px; }
.btn-ghost { color: var(--ink); box-shadow: 0 0 0 1px rgba(236, 239, 245, .22) inset; background: rgba(8, 11, 18, .4); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn-ghost:hover { box-shadow: 0 0 0 1px rgba(236, 239, 245, .55) inset; }
.btn-sm { --h: 40px; padding: 0 18px; font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ——— Общие элементы секций ——— */
.kicker {
  display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--mut);
}
.kicker::before { content: ""; width: 22px; height: 2px; background: var(--red); }
.section { padding: clamp(90px, 14vh, 160px) 0; position: relative; }
.section-title { font-size: clamp(36px, 5.4vw, 72px); margin-top: 18px; max-width: 14ch; }
.lead { color: var(--mut); font-size: clamp(17px, 1.5vw, 20px); max-width: 52ch; margin-top: 20px; }

.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ——— Hero ——— */
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; position: relative; padding: 120px 0 90px; }
.hero-copy { max-width: 760px; position: relative; }
.hero h1 { font-size: clamp(44px, 7.6vw, 116px); margin: 22px 0 6px; line-height: .92; text-shadow: 0 10px 40px rgba(0, 0, 0, .6); }
.hero .sub { font-family: var(--fd); color: var(--red); font-size: clamp(16px, 1.6vw, 22px); letter-spacing: .14em; text-transform: uppercase; }
.hero .hook { font-size: clamp(19px, 1.9vw, 24px); line-height: 1.45; margin: 26px 0 36px; max-width: 30ch; color: #d6dbe5; }
.hero .actions { margin-bottom: 40px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; list-style: none; padding: 0; margin: 0; color: var(--mut); font-size: 15px; }
.facts b { color: var(--ink); font-family: var(--fd); font-weight: 400; font-size: 22px; margin-right: 6px; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  width: 26px; height: 42px; border-radius: 14px; box-shadow: 0 0 0 1.5px rgba(236, 239, 245, .3) inset;
}
.scroll-cue::after {
  content: ""; position: absolute; left: 50%; top: 9px; width: 3px; height: 8px; margin-left: -1.5px;
  border-radius: 2px; background: var(--red); animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ——— Скролл-сюжет ——— */
.story-head { padding-top: 40px; }
.chapter { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; }
.chapter-card { max-width: 480px; }
.chapter .num { font-family: var(--fd); font-size: 15px; color: var(--red); letter-spacing: .2em; }
.chapter h3 { font-size: clamp(40px, 5vw, 68px); margin: 14px 0 20px; }
.chapter p { color: #c3cad6; font-size: clamp(17px, 1.4vw, 19px); }
.chapter .tag {
  display: inline-block; margin-top: 22px; font-size: 13px; font-weight: 600; letter-spacing: .08em;
  color: var(--mut); padding: 7px 12px; border-radius: 8px; background: rgba(255, 255, 255, .04); box-shadow: 0 0 0 1px var(--line) inset;
}
.no-webgl .chapter { min-height: 0; padding: 60px 0; }

/* ——— Механики ——— */
.mech { background: linear-gradient(180deg, transparent, rgba(10, 14, 22, .92) 12%, rgba(10, 14, 22, .92) 88%, transparent); }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 56px; }
.card {
  position: relative; padding: 30px 26px 30px; border-radius: 20px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
  box-shadow: var(--shadow-card);
  transition: transform .35s ease, box-shadow .35s ease;
}
.card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 210, 154, .35), transparent);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 59, 48, .35), 0 20px 60px -30px var(--red-glow); }
.card svg { width: 38px; height: 38px; color: var(--red); margin-bottom: 26px; }
.card h3 { font-size: 22px; margin-bottom: 12px; line-height: 1.15; }
.card p { color: var(--mut); font-size: 16px; }
.strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 18px; border-radius: 20px; overflow: hidden;
  background: var(--line); box-shadow: var(--shadow-card);
}
.strip div { background: #090c13; padding: 26px; }
.strip b { display: block; font-family: var(--fd); font-weight: 400; font-size: clamp(32px, 3.4vw, 46px); line-height: 1; color: var(--ink); }
.strip span { display: block; margin-top: 10px; color: var(--mut); font-size: 15px; }
.strip b em { font-style: normal; color: var(--red); }

/* ——— Кадры ——— */
.shots { display: grid; grid-template-columns: 1.35fr 1fr; grid-template-rows: auto auto; gap: 18px; margin-top: 56px; }
.shot { position: relative; display: block; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-card); text-decoration: none; background: var(--bg-2); }
.shot:first-child { grid-row: span 2; }
.shot img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.shot:hover img { transform: scale(1.035); }
.shot figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 50px 22px 18px; font-size: 15px; color: #d9dee8;
  background: linear-gradient(0deg, rgba(3, 4, 8, .92), transparent);
}
.shot figcaption b { font-family: var(--fd); font-weight: 400; color: var(--ink); margin-right: 8px; }
.shots figure { margin: 0; height: 100%; }
.lightbox { padding: 0; border: 0; background: transparent; max-width: min(96vw, 1400px); max-height: 92vh; }
.lightbox::backdrop { background: rgba(2, 3, 6, .88); backdrop-filter: blur(6px); }
.lightbox img { width: 100%; height: auto; max-height: 92vh; object-fit: contain; border-radius: 12px; cursor: zoom-out; }

/* ——— Живые кадры ——— */
.live-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 48px; }
.live-item { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow-card); }
.live-item img, .live-item video { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.live-item:hover img, .live-item:hover video { transform: scale(1.04); }
.live-item.is-video::after {
  content: ""; position: absolute; top: 12px; right: 12px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 0 4px rgba(255, 59, 48, .25);
}
.live .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 4px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* ——— Финал ——— */
.final { min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; padding: 120px 0 clamp(70px, 10vh, 120px); text-align: center; }
.final .wrap { display: flex; flex-direction: column; align-items: center; }
.final h2 { font-size: clamp(40px, 6.4vw, 92px); max-width: 16ch; text-shadow: 0 10px 40px rgba(0, 0, 0, .7); }
.final .lead { margin: 22px auto 36px; }
.final .actions { justify-content: center; }
.no-webgl .final { min-height: 0; padding-top: 80px; }

/* ——— Адаптив ——— */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 899px) {
  .hero { align-items: flex-end; padding-bottom: 80px; }
  .hero-copy::before, .chapter-card::before {
    content: ""; position: absolute; inset: -40px -30px; z-index: -1;
    background: radial-gradient(closest-side, rgba(5, 7, 11, .85), rgba(5, 7, 11, .4) 70%, transparent);
  }
  .chapter { align-items: flex-end; padding-bottom: 12vh; }
  .chapter-card { position: relative; }
  .shots { grid-template-columns: 1fr; }
  .shot:first-child { grid-row: auto; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .live-grid { grid-template-columns: repeat(2, 1fr); }
  .scroll-cue { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .cards { grid-template-columns: 1fr; }
  .top .btn-sm { display: none; }
  .btn { --h: 52px; padding: 0 22px; font-size: 16px; }
  .actions .btn { flex: 1 1 auto; }
}

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

/* Скрытый канвас не держит композитор. */
.webgl-ready.stage-off #stage { visibility: hidden; transition: opacity .9s ease, visibility 0s linear .9s; }
