@font-face { font-family: "Unbounded"; font-weight: 500; font-display: swap; src: url("../fonts/unbounded-latin-500-normal.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Unbounded"; font-weight: 500; font-display: swap; src: url("../fonts/unbounded-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-weight: 400; font-display: swap; src: url("../fonts/manrope-latin-400-normal.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-weight: 400; font-display: swap; src: url("../fonts/manrope-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-weight: 600; font-display: swap; src: url("../fonts/manrope-latin-600-normal.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-weight: 600; font-display: swap; src: url("../fonts/manrope-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --bg: #080d0e;
  --bg-2: #0d1415;
  --ink: #eef1ee;
  --muted: #95a3a1;
  --dim: #5d6b6a;
  --line: rgba(238, 241, 238, 0.09);
  --accent: #ff5646;
  --accent-ink: #1a0604;
  --warm: 255, 196, 140; /* цвет ключевого света сцены — для теней */
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pad: clamp(20px, 5vw, 72px);
  --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--body);
  -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(--display); font-weight: 500; letter-spacing: -0.02em; line-height: 1.02; margin: 0; }
p { margin: 0; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; }

/* ——— сцена ——— */
.stage-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 55% at 58% 42%, rgba(255, 170, 100, 0.16), transparent 70%),
    radial-gradient(90% 80% at 50% 110%, rgba(20, 60, 64, 0.5), transparent 70%),
    var(--bg);
}
.stage-bg::after { /* красное свечение аномалии, яркость задаёт скрипт */
  content: ""; position: absolute; inset: 0; opacity: var(--red, 0);
  background: radial-gradient(45% 45% at 58% 40%, rgba(255, 60, 40, 0.28), transparent 70%);
  transition: opacity .3s linear;
}
#scene {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none;
  opacity: 0; transition: opacity 1.1s ease;
}
.webgl-ready #scene { opacity: 1; }
.poster { /* без WebGL: кадр из игры вместо сцены */
  position: fixed; inset: 0; z-index: 1; pointer-events: none; display: none;
  background: linear-gradient(90deg, rgba(8, 13, 14, 0.92) 0%, rgba(8, 13, 14, 0.35) 55%, rgba(8, 13, 14, 0.6) 100%), url("../shots/window.webp") center / cover no-repeat;
}
.no-webgl .poster { display: block; }
.no-webgl #scene { display: none; }

/* ——— шапка ——— */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  padding: 18px var(--pad);
  background: linear-gradient(rgba(8, 13, 14, 0.75), rgba(8, 13, 14, 0));
}
.brand { font: 500 15px/1 var(--display); text-decoration: none; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.brand-eye { width: 10px; height: 16px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px 2px rgba(255, 86, 70, 0.55); position: relative; }
.brand-eye::after { content: ""; position: absolute; left: 4px; top: 3px; width: 2px; height: 10px; border-radius: 2px; background: #1a0604; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.top nav a { text-decoration: none; font-size: 14px; color: var(--muted); padding: 8px 12px; border-radius: 999px; transition: color .2s, background .2s; }
.top nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.top nav .lang a { padding: 5px 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; }
.lang a[aria-current="page"] { color: var(--ink); background: rgba(255, 255, 255, 0.1); }
.top .btn { padding: 10px 18px; font-size: 14px; }

/* ——— кнопки ——— */
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font: 600 16px/1 var(--body); padding: 17px 28px; border-radius: 999px;
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s, background .25s;
}
.btn-play {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 10px 30px -8px rgba(255, 86, 70, 0.6), 0 2px 0 rgba(255, 255, 255, 0.25) inset;
}
.btn-play:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(255, 86, 70, 0.75), 0 2px 0 rgba(255, 255, 255, 0.25) inset; }
.btn-play svg { width: 14px; height: 14px; }
.btn-ghost { color: var(--ink); border: 1px solid rgba(238, 241, 238, 0.22); background: rgba(8, 13, 14, 0.35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: rgba(238, 241, 238, 0.5); transform: translateY(-2px); }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ——— общий ——— */
main { position: relative; z-index: 2; }
section { position: relative; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .6; }
.solid { background: var(--bg); }
.wrap { padding: 0 var(--pad); max-width: 1320px; margin: 0 auto; }

/* ——— hero ——— */
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; padding: 120px var(--pad) clamp(40px, 9vh, 96px); }
.hero-text { max-width: 620px; text-shadow: 0 2px 30px rgba(8, 13, 14, 0.8); }
.hero h1 { font-size: clamp(46px, 8.2vw, 124px); margin: 18px 0 20px; }
.hero h1 span { display: block; font-size: 0.34em; letter-spacing: 0.02em; color: var(--accent); margin-top: 0.35em; }
.hook { font-size: clamp(18px, 1.8vw, 22px); line-height: 1.45; color: #d9dfdc; max-width: 30em; margin-bottom: 32px; }
.facts { list-style: none; padding: 0; margin: 34px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 14px; }
.facts b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.scroll-cue { position: absolute; right: var(--pad); bottom: clamp(40px, 9vh, 96px); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); writing-mode: vertical-rl; display: flex; align-items: center; gap: 14px; }
.scroll-cue::after { content: ""; width: 1px; height: 64px; background: linear-gradient(var(--dim), transparent); animation: cue 2.4s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* ——— история смены ——— */
.story-head { padding: 12vh var(--pad) 0; max-width: 1320px; margin: 0 auto; }
.story-head h2 { font-size: clamp(34px, 5vw, 72px); max-width: 12em; margin-top: 16px; text-shadow: 0 2px 30px rgba(8, 13, 14, 0.8); }
.step { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 0 var(--pad); max-width: 1320px; margin: 0 auto; }
.step-card {
  max-width: 440px; padding: 30px 32px 32px; border-radius: var(--radius);
  background: rgba(10, 16, 17, 0.62); border: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8), -10px -14px 40px -30px rgba(var(--warm), 0.35);
}
.step-num { font: 500 13px/1 var(--display); color: var(--accent); letter-spacing: 0.06em; }
.step h3 { font-size: clamp(26px, 2.6vw, 36px); margin: 14px 0 14px; }
.step p { color: #c8d0cd; }
.step p + p { margin-top: 10px; }
.step .note { color: var(--muted); font-size: 15px; }

/* CCTV-оверлей поверх сцены */
.cctv {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px),
    radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.7));
  mix-blend-mode: multiply;
}
.cctv-hud { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0; font: 600 15px/1 var(--body); letter-spacing: 0.08em; color: rgba(230, 240, 230, 0.85); font-variant-numeric: tabular-nums; }
.cctv-hud span { position: absolute; }
.cctv-hud .rec { top: 92px; left: var(--pad); display: flex; align-items: center; gap: 8px; }
.cctv-hud .rec::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: blink 1s steps(2) infinite; }
.cctv-hud .cam { top: 92px; right: var(--pad); text-align: right; }
.cctv-hud .clock { bottom: 32px; right: var(--pad); }
@keyframes blink { 50% { opacity: 0; } }
.flash { position: fixed; inset: 0; z-index: 3; pointer-events: none; background: #fff6e8; opacity: 0; }

/* ——— механики ——— */
.mechanics { padding: 16vh 0 12vh; }
.sec-head { display: grid; gap: 18px; margin-bottom: 56px; }
.sec-head h2 { font-size: clamp(34px, 4.6vw, 64px); max-width: 13em; }
.sec-head p { color: var(--muted); max-width: 36em; font-size: 18px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  position: relative; padding: 28px 26px 30px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(var(--warm), 0.08);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .35s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(255, 86, 70, 0.35); }
.card-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 86, 70, 0.1); color: var(--accent); margin-bottom: 26px; }
.card-icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 21px; line-height: 1.15; margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.stats { list-style: none; margin: 56px 0 0; padding: 30px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stats b { display: block; font: 500 clamp(34px, 4vw, 54px)/1 var(--display); letter-spacing: -0.03em; margin-bottom: 10px; }
.stats span { color: var(--muted); font-size: 15px; }

/* ——— скриншоты ——— */
.shots { padding: 10vh 0 14vh; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gallery figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); box-shadow: 0 30px 60px -35px rgba(0, 0, 0, 0.95); }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 22px 18px; font-size: 14.5px; color: #dfe5e2; background: linear-gradient(transparent, rgba(8, 13, 14, 0.9)); }

/* ——— живые кадры ——— */
.live { padding: 0 0 14vh; }
.live[hidden] { display: none; }
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(255, 86, 70, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255, 86, 70, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 86, 70, 0); } }
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.live-grid a { display: block; border-radius: 14px; overflow: hidden; background: var(--bg-2); aspect-ratio: 16 / 10; border: 1px solid var(--line); transition: transform .3s, border-color .3s; }
.live-grid a:hover { transform: translateY(-3px); border-color: rgba(255, 86, 70, 0.4); }
.live-grid img, .live-grid video { width: 100%; height: 100%; object-fit: cover; }

/* ——— финал ——— */
.final { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 14vh var(--pad); }
.final-text { max-width: 600px; text-shadow: 0 2px 30px rgba(8, 13, 14, 0.85); }
.final h2 { font-size: clamp(40px, 6vw, 88px); margin: 18px 0 22px; }
.final p { color: #cfd6d3; font-size: 19px; margin-bottom: 34px; max-width: 26em; }
.final-gap { height: 12vh; }

/* ——— появление ——— */
.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 (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .top { padding: 14px 16px; gap: 10px; }
  .top nav .page-link { display: none; }
  .top .btn { padding: 9px 14px; }
  .brand span { display: none; }
  .hero { align-items: flex-end; padding-top: 50vh; }
  .hero-text { background: linear-gradient(transparent, rgba(8, 13, 14, 0.7) 18%); margin: 0 calc(var(--pad) * -1); padding: 40px var(--pad) 0; }
  .scroll-cue { display: none; }
  .step { align-items: flex-end; padding-bottom: 8vh; }
  .step-card { padding: 22px 22px 24px; }
  .cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .final { align-items: flex-end; }
  .final-text { background: linear-gradient(transparent, rgba(8, 13, 14, 0.75) 20%); margin: 0 calc(var(--pad) * -1); padding: 50px var(--pad) 0; }
  .cctv-hud .rec, .cctv-hud .cam { top: 76px; }
}

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

/* затемнение сцены под текстом на широком экране */
@media (min-width: 761px) {
  .hero::before, .final::before, .story::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(90deg, rgba(8, 13, 14, 0.9) 0%, rgba(8, 13, 14, 0.62) 30%, rgba(8, 13, 14, 0) 58%);
  }
  .hero > :not(.scroll-cue), .final > * { position: relative; }
}
section[aria-labelledby] { scroll-margin-top: 80px; }
