/* RED SIGNAL — промо-страница. Палитра взята из игры (src/style.css):
   тот же ink, тот же красный, тот же тёплый песок. */

:root {
  --ink: #0a0608;
  --ink-2: #120a0c;
  --red: #ff3b30;
  --red-deep: #c11d14;
  --orange: #ff8a5c;
  --blue: #3fa9f5;
  --text: #f2e9e4;
  --muted: #b7a49a;
  --dim: #7b6a63;
  --line: rgba(255, 233, 225, .13);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --pad: clamp(20px, 5vw, 96px);
  --shadow-lift: 0 30px 80px -40px rgba(0, 0, 0, .95), 0 2px 0 rgba(255, 233, 225, .05) inset;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* ── сцена ───────────────────────────────────────────────────────────── */

#stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 85% at 50% 58%, rgba(255, 120, 70, .20) 0%, rgba(120, 35, 20, .10) 38%, rgba(10, 6, 8, 0) 72%),
    linear-gradient(180deg, #160c0c 0%, #0a0608 55%, #0a0608 100%);
}

#stage canvas { width: 100%; height: 100%; display: block; }

/* Вуаль поверх сцены: гасит левую треть и низ, чтобы крупный текст читался
   поверх любой картинки, а не только поверх удачного кадра. */
#stage .veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10, 6, 8, .93) 0%, rgba(10, 6, 8, .72) 26%, rgba(10, 6, 8, .18) 56%, rgba(10, 6, 8, 0) 78%),
    linear-gradient(0deg, rgba(10, 6, 8, .74) 0%, rgba(10, 6, 8, .16) 30%, rgba(10, 6, 8, 0) 56%),
    linear-gradient(180deg, rgba(10, 6, 8, .72) 0%, rgba(10, 6, 8, 0) 22%);
}
@media (max-width: 860px) {
  #stage .veil {
    background:
      linear-gradient(0deg, rgba(10, 6, 8, .95) 0%, rgba(10, 6, 8, .62) 40%, rgba(10, 6, 8, .1) 72%),
      linear-gradient(180deg, rgba(10, 6, 8, .78) 0%, rgba(10, 6, 8, 0) 26%);
  }
}

/* Прозрачность сцены ведёт скрипт покадрово (site.js): на выходе из зоны она
   гаснет, чтобы следующая секция не наехала на модель. Перехода тут быть не
   должно — он бы отставал от скролла. */

/* Пока WebGL не поднялся (или его нет) — постер. Он же фон при reduced-motion. */
#stage .poster {
  position: absolute;
  inset: 0;
  background-image: url("shots/poster.jpg");
  background-size: cover;
  background-position: 50% 52%;
  opacity: 0;
  transition: opacity .8s ease;
  mask-image: radial-gradient(130% 100% at 50% 45%, #000 45%, transparent 82%);
  -webkit-mask-image: radial-gradient(130% 100% at 50% 45%, #000 45%, transparent 82%);
}
#stage.poster-on .poster { opacity: .85; }

/* Плёнка: лёгкое зерно поверх сцены, чтобы низкополигональные грани не звенели. */
#stage::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* ── общая сетка ─────────────────────────────────────────────────────── */

main { position: relative; z-index: 1; }

section { padding: clamp(84px, 13vh, 150px) var(--pad); }

.wrap { max-width: 1180px; margin: 0 auto; width: 100%; }

/* Секции, под которыми крутится 3D, прозрачны; остальные закрывают сцену. */
.solid {
  background: var(--ink);
  box-shadow: 0 -1px 0 var(--line);
}
.solid-soft {
  /* Растушёвка фиксированной длины, а не в процентах: на телефоне секция вдвое
     выше, и девять процентов превращались в окно, где модель резало пополам. */
  background: linear-gradient(180deg, rgba(10, 6, 8, 0) 0, var(--ink) 110px, var(--ink) 100%);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 59, 48, .45), transparent);
  max-width: 160px;
}

h2 {
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.06;
  letter-spacing: -.02em;
  margin: 0 0 20px;
  font-weight: 800;
}

h3 {
  font-size: 20px;
  letter-spacing: .01em;
  margin: 0 0 10px;
  font-weight: 700;
}

p { margin: 0 0 16px; color: var(--muted); }
p.lead { color: var(--text); font-size: clamp(18px, 2vw, 22px); line-height: 1.5; max-width: 46ch; }

/* ── шапка ───────────────────────────────────────────────────────────── */

.top {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px var(--pad);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
}
.top .mark { color: var(--text); }
.top .mark b { color: var(--red); font-weight: 800; }
.lang { display: flex; gap: 2px; align-items: center; }
.lang a {
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid transparent;
  color: var(--dim);
  transition: color .2s ease, border-color .2s ease;
}
.lang a:hover { color: var(--text); }
.lang a[aria-current] { color: var(--text); border-color: var(--line); }

/* ── герой ───────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(56px, 10vh, 110px);
  padding-top: 120px;
  overflow: hidden;
}

/* Уголки рамки — тот же приём, что в меню игры. */
.hero .frame {
  position: absolute;
  inset: 18px;
  pointer-events: none;
}
.hero .frame i {
  position: absolute;
  width: 34px; height: 34px;
  border: 1px solid rgba(255, 233, 225, .22);
}
.hero .frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.hero .frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.hero .frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.hero .frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; }

.hero .wrap { position: relative; }

h1 {
  font-size: clamp(50px, 11.6vw, 152px);
  line-height: .86;
  letter-spacing: -.035em;
  font-weight: 800;
  margin: 0 0 8px;
  text-transform: uppercase;
}
h1 .a { color: var(--red); text-shadow: 0 0 60px rgba(255, 59, 48, .45); }
h1 .b { color: var(--text); }

.hero .rule {
  width: 132px;
  height: 2px;
  background: linear-gradient(90deg, var(--red), rgba(255, 59, 48, 0));
  margin: 22px 0 20px;
}

.hero .hook {
  font-size: clamp(19px, 2.5vw, 30px);
  line-height: 1.24;
  font-weight: 600;
  color: var(--text);
  max-width: 19ch;
  margin: 0 0 12px;
  text-wrap: balance;
}
.hero .sub {
  max-width: 44ch;
  margin: 0 0 32px;
  color: var(--muted);
}

/* ── кнопки ──────────────────────────────────────────────────────────── */

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.btn {
  --clip: 12px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 17px 30px;
  font: 700 15px/1 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 233, 225, .05);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--clip)), calc(100% - var(--clip)) 100%, 0 100%);
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-2px); background: rgba(255, 233, 225, .1); border-color: rgba(255, 233, 225, .28); }
.btn:active { transform: translateY(0); }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn.primary {
  background: linear-gradient(180deg, #ff4b3f, var(--red-deep));
  border-color: transparent;
  color: #fff;
  font-size: 16px;
  padding: 19px 38px;
  box-shadow: 0 18px 50px -22px rgba(255, 59, 48, .95), 0 0 0 1px rgba(255, 130, 110, .35) inset;
}
.btn.primary:hover {
  background: linear-gradient(180deg, #ff6154, #d92218);
  box-shadow: 0 22px 60px -20px rgba(255, 59, 48, 1), 0 0 0 1px rgba(255, 160, 140, .5) inset;
}

.hint {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 22px 0 0;
}

/* ── скролл-раскадровка ──────────────────────────────────────────────── */

.beats { padding: 0 var(--pad); }
.beat {
  min-height: 96svh;
  display: flex;
  align-items: center;
}
.beat .card {
  max-width: 500px;
  padding: 34px 34px 30px;
  background: linear-gradient(180deg, rgba(18, 10, 12, .84), rgba(10, 6, 8, .78));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-left: 2px solid var(--red);
  box-shadow: var(--shadow-lift);
}
.beat:nth-child(even) { justify-content: flex-end; }
.beat .card h2 { font-size: clamp(26px, 3.2vw, 38px); }
.beat .card p:last-child { margin-bottom: 0; }
.beat .num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .24em;
  color: var(--red);
  margin-bottom: 14px;
}

/* ── карточки механик ────────────────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 46px;
}
.card-m {
  background: var(--ink);
  padding: 34px 30px 32px;
  transition: background .25s ease;
}
.card-m:hover { background: #100a0c; }
.card-m .ix {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--red);
  display: block;
  margin-bottom: 20px;
}
.card-m p { margin: 0; font-size: 15.5px; }
.card-m .spec {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--dim);
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.card-m .spec b { color: var(--orange); font-weight: 600; }

/* ── шасси ───────────────────────────────────────────────────────────── */

.rigs { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-top: 40px; }
.rig {
  border: 1px solid var(--line);
  padding: 24px 24px 22px;
  background: linear-gradient(180deg, rgba(255, 233, 225, .03), transparent);
}
.rig h3 { margin-bottom: 4px; text-transform: uppercase; letter-spacing: .06em; font-size: 17px; }
.rig .role { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; color: var(--orange); text-transform: uppercase; }
.rig p { margin: 14px 0 0; font-size: 15px; }
.rig.on { border-color: rgba(255, 59, 48, .5); box-shadow: 0 0 0 1px rgba(255, 59, 48, .18); }

/* ── скриншоты ───────────────────────────────────────────────────────── */

.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 46px; }
.shots figure { margin: 0; }
.shots img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #140c0e;
  box-shadow: var(--shadow-lift);
}
.shots figcaption {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--dim);
  margin-top: 12px;
  line-height: 1.5;
}
.shots figcaption b { color: var(--muted); font-weight: 600; }

/* ── живые кадры ─────────────────────────────────────────────────────── */

#live { display: none; }
#live.on { display: block; }
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 40px; }
.live-grid a {
  display: block;
  position: relative;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #140c0e;
}
.live-grid img, .live-grid video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.live-grid a:hover img, .live-grid a:hover video { transform: scale(1.04); }
.live-grid .play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  padding: 4px 8px;
  background: rgba(10, 6, 8, .8);
  border: 1px solid var(--line);
}

/* ── финал ───────────────────────────────────────────────────────────── */

.finale {
  position: relative;
  min-height: 92svh;
  display: flex;
  align-items: center;
  text-align: center;
  justify-content: center;
}
.finale .wrap { max-width: 860px; }
.finale h2 { font-size: clamp(34px, 6vw, 76px); letter-spacing: -.03em; text-wrap: balance; }
.finale .cta-row { justify-content: center; }
.finale p.lead { margin: 0 auto 36px; text-align: center; }

/* ── мелочи ──────────────────────────────────────────────────────────── */

.two { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(30px, 6vw, 80px); align-items: start; }

@media (max-width: 860px) {
  /* На телефоне модель стоит прямо за карточкой — текст обязан выигрывать. */
  .beat .card { background: linear-gradient(180deg, rgba(14, 8, 10, .95), rgba(10, 6, 8, .93)); }
  .two { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr; }
  .beat { min-height: 88svh; }
  .beat:nth-child(even) { justify-content: flex-start; }
  .hero { align-items: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
