/* ---- первый экран: тлеющие пиксели, заголовок выезжает построчно ---- */
.hero { position: relative; padding: 96px 0 120px; overflow: hidden; }
.hero__embers { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; }
/* низ первого экрана уходит в фон полосами, как пиксельный градиент */
.hero__ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  background: linear-gradient(transparent 0 20%, rgba(12, 11, 10, 0.35) 20% 40%, rgba(12, 11, 10, 0.6) 40% 60%, rgba(12, 11, 10, 0.85) 60% 80%, var(--bg) 80%);
  pointer-events: none;
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.hero__title { display: grid; font: 600 clamp(44px, 6.4vw, 80px)/0.98 var(--display); letter-spacing: -0.01em; }
.hero__line { display: block; overflow: hidden; padding-bottom: 0.08em; animation: rise 0.8s var(--ease) backwards; }
.hero__line--accent { color: var(--accent); text-shadow: 4px 4px 0 #4a3210; animation-delay: 0.12s; }
/* мигающий курсор-блок после второй строки */
.hero__line--accent::after {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 0.12em;
  margin-left: 0.08em;
  background: var(--accent);
  box-shadow: 4px 4px 0 #4a3210;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes rise { from { opacity: 0; transform: translateY(40%); clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 -20% 0); } }
.hero__text { margin: 26px 0 34px; max-width: 520px; color: var(--muted); font-size: 17px; line-height: 1.65; animation: rise-soft 0.8s 0.25s var(--ease) backwards; }
.hero .actions { animation: rise-soft 0.8s 0.35s var(--ease) backwards; }
.hero__term { animation: term-in 0.9s 0.2s var(--ease) backwards; }
@keyframes rise-soft { from { opacity: 0; transform: translateY(14px); } }
@keyframes term-in { from { opacity: 0; transform: translateY(24px) rotate(1.5deg); } }

/* ---- консоль ---- */
.term {
  --s: 4px;
  --bw: 3px;
  --px-line: var(--line-strong);
  --px-fill: #0e0d0b;
  transition: transform 0.2s var(--ease), background 0.2s;
  padding: 3px;
  will-change: transform;
}
.term:hover { --px-line: #4d4538; }
.term__bar { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-bottom: 2px solid var(--line); background: #15130f; }
.term__bar i { width: 10px; height: 10px; background: #ff5f57; }
.term__bar i:nth-child(2) { background: #febc2e; }
.term__bar i:nth-child(3) { background: #28c840; }
.term__bar span { margin-left: 10px; color: var(--faint); font: 12px/1 var(--mono); }
.term__body {
  height: 340px;
  margin: 0;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  color: #bdb5a7;
  font: 12.5px/1.7 var(--mono);
  white-space: pre-wrap;
  word-break: break-word;
}
.term__line { display: block; animation: line-in 0.18s steps(3); }
.term__line.cmd { color: var(--text); }
.term__line.dim { color: var(--faint); }
.term__line.ok { color: var(--ok); }
.term__line em { font-style: normal; color: var(--accent); }
.term__line b { font-weight: 400; color: var(--text); }
.term__line u { display: inline-block; width: 8px; height: 15px; margin-left: 1px; vertical-align: -3px; background: var(--accent); text-decoration: none; animation: blink 1s steps(1) infinite; }
@keyframes line-in { from { opacity: 0; transform: translateX(-6px); } }
@keyframes blink { 50% { opacity: 0; } }

/* уведомление NotifyLib: выезжает в правом верхнем углу окна, полоса таймера убывает */
.toast {
  position: absolute;
  top: 56px;
  right: 16px;
  width: 250px;
  padding: 10px 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #13200f;
  box-shadow: inset 0 0 0 2px rgba(123, 227, 106, 0.4), inset 0 -4px 0 rgba(0, 0, 0, 0.35);
  overflow: hidden;
  opacity: 0;
  transform: translateX(calc(100% + 24px));
  transition: transform 0.5s var(--bounce), opacity 0.3s;
}
.toast.is-shown { opacity: 1; transform: none; }
.toast__icon { width: 28px; height: 28px; display: grid; place-items: center; flex-shrink: 0; background: rgba(123, 227, 106, 0.18); color: var(--ok); font-weight: 700; }
.toast__text { display: grid; font-size: 13px; line-height: 1.35; }
.toast__text b { color: var(--ok); font: 600 11px/1.4 var(--mono); }
.toast__bar { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: var(--ok); transform-origin: left; transform: scaleX(0); }
.toast.is-shown .toast__bar { animation: drain 4.8s linear forwards; }
@keyframes drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ---- бегущая строка релизов ---- */
.ticker { display: flex; align-items: center; border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); background: var(--bg-raised); overflow: hidden; }
.ticker__label {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  padding: 14px 18px 14px var(--gutter);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: 12px 0 18px var(--bg-raised);
}
.ticker__track { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent); }
.ticker__run { display: flex; width: max-content; }
.ticker__run.is-moving { animation: marquee 45s linear infinite; }
.ticker:hover .ticker__run { animation-play-state: paused; }
.ticker__copy { display: flex; }
.ticker__item { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; font-size: 13px; white-space: nowrap; transition: color 0.15s; }
.ticker__item + .ticker__item, .ticker__copy .ticker__item:first-child { border-left: 2px dashed var(--line); }
.ticker__item b { font-weight: 600; }
.ticker__item .mono { color: var(--accent); }
.ticker__ago { color: var(--faint); }
.ticker__item:hover b { color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---- секции ---- */
.section { padding: 80px 0; }
.section--tight { padding: 32px 0; }
.section--flush { padding: 8px 0 0; }
.section--band { background: var(--bg-raised); border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); }

.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.section__num { display: block; margin-bottom: 10px; color: var(--accent); font-size: 12px; letter-spacing: 0.1em; }
.section__num::before { content: "// "; color: var(--faint); }
.section__head h2, .split h2, .cta h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.05; }
.section__head p { margin-top: 12px; color: var(--muted); max-width: 560px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.split--center { align-items: center; }
.split__copy { display: grid; gap: 18px; justify-items: start; }
.split__copy .section__num { margin-bottom: -6px; }
.split__copy p { color: var(--muted); font-size: 16px; max-width: 520px; }

.features { display: grid; gap: 12px; }
.feature { --px-fill: var(--surface); display: flex; gap: 16px; padding: 20px; }
.feature:hover { --px-line: var(--line-strong); }
.feature__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 2px rgba(242, 184, 75, 0.25);
  color: var(--accent);
  transition: transform 0.4s var(--bounce), background 0.2s;
}
.feature:hover .feature__icon { transform: rotate(-8deg) scale(1.1); background: rgba(242, 184, 75, 0.2); }
.feature h3 { font-size: 16px; margin-bottom: 4px; }
.feature p { color: var(--muted); font-size: 14px; }

/* ---- цифры ---- */
.stats { --px-fill: var(--surface); display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { display: flex; flex-direction: column-reverse; gap: 4px; padding: 30px; }
.stat + .stat { border-left: 2px dashed var(--line); }
.stat dd { font-size: clamp(36px, 4.6vw, 54px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; color: var(--text); }
.stat:first-child dd { color: var(--accent); }
.stat dt { color: var(--muted); font-size: 14px; }

/* ---- команда на главной: головы покачиваются, как в игре на месте ---- */
.avatars { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.avatar { --px-fill: var(--surface); display: grid; justify-items: center; gap: 14px; padding: 28px 32px 22px; }
.avatar:hover { --px-line: var(--accent); }
.avatar__head { width: 80px; height: 80px; image-rendering: pixelated; animation: bob 2.4s steps(6) infinite; filter: drop-shadow(0 8px 0 rgba(0, 0, 0, 0.35)); }
.avatars li:nth-child(2) .avatar__head { animation-delay: -1.2s; }
.avatar:hover .avatar__head { animation: hop 0.5s steps(5); }
.avatar__name { color: var(--muted); font-size: 13px; }
.avatar__badge { position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); }
@keyframes bob { 50% { transform: translateY(-5px); } }

/* ---- приглашение в Discord ---- */
.cta {
  --s: 4px;
  --bw: 3px;
  --px-line: var(--discord);
  --px-fill: #191b33;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 44px;
  overflow: hidden;
}
/* в углу — пиксельная россыпь, как частицы портала */
.cta::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 280px;
  height: 100%;
  z-index: -1;
  background:
    linear-gradient(var(--discord), var(--discord)) 40px 30px / 8px 8px no-repeat,
    linear-gradient(#8891f7, #8891f7) 120px 70px / 6px 6px no-repeat,
    linear-gradient(var(--discord), var(--discord)) 200px 20px / 10px 10px no-repeat,
    linear-gradient(#aab1ff, #aab1ff) 240px 110px / 6px 6px no-repeat,
    linear-gradient(var(--discord), var(--discord)) 170px 140px / 8px 8px no-repeat,
    linear-gradient(#8891f7, #8891f7) 80px 150px / 6px 6px no-repeat;
  opacity: 0.55;
  animation: drift 6s steps(12) infinite alternate;
}
@keyframes drift { to { transform: translateY(-12px); } }
.cta p { margin-top: 10px; color: #b8bce6; max-width: 520px; }
.cta--quiet { margin-top: 32px; }

@media (max-width: 960px) {
  .hero { padding: 56px 0 80px; }
  .hero__grid, .split { grid-template-columns: 1fr; gap: 40px; }
  .term__body { height: 300px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 2px dashed var(--line); }
}

@media (max-width: 640px) {
  .section { padding: 60px 0; }
  .section__head { flex-direction: column; align-items: flex-start; }
  .term__body { height: 280px; font-size: 11px; padding: 12px; }
  .toast { width: 210px; }
  .stat { padding: 22px; }
  .cta { flex-direction: column; align-items: flex-start; padding: 30px 22px; }
  .ticker__label { padding-left: 16px; }
}
