/* ============================================================
   Qilas Games — games.qilascorp.com
   Тот же визуальный язык, что у qilascorp.com: тёмный космос, моноширинные подписи,
   неон подразделения (розовый → голубой). Обычная прокрутка, без 3D-движка — лёгкая страница.
   ============================================================ */
:root {
  --bg: #05040c;
  --ink: #eeedf6;
  --ink-2: rgba(238, 237, 246, .66);
  --ink-3: rgba(238, 237, 246, .38);
  --line: rgba(238, 237, 246, .12);
  --line-2: rgba(238, 237, 246, .22);
  --g1: #ff4fb0;
  --g2: #4ff0ff;
  --g3: #b67bff;
  --brand-red: #c92335;
  --brand-light: #e8e5df;
  --f-display: "Unbounded", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --f-body: "Manrope", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
main { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--g1); color: #000; }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.dim { color: var(--ink-3); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ql-red { fill: var(--brand-red); }
.ql-light { fill: var(--brand-light); }

/* ---------- фон: пиксельный гиперпрыжок ---------- */
.warp { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; image-rendering: crisp-edges; opacity: .75; }
.scan { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px); }
.vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, .7) 100%); }
main, .nav, .foot { position: relative; z-index: 2; }

/* ---------- шапка ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 18px var(--gutter);
  background: linear-gradient(to bottom, rgba(5, 4, 12, .85), transparent);
  transition: transform .5s var(--ease);
}
.nav.is-hidden { transform: translateY(-110%); }
.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__lockup { display: block; height: 26px; width: auto; aspect-ratio: 1492 / 355; }
.nav__div { font-family: var(--f-display); font-weight: 800; font-size: 13px; letter-spacing: .02em; background: linear-gradient(90deg, var(--g1), var(--g2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav__links { display: flex; gap: clamp(16px, 2.6vw, 36px); }
.nav__links a { color: var(--ink-2); transition: color .3s; }
.nav__links a:hover { color: var(--ink); }
.nav__right { display: flex; align-items: center; gap: 14px; }
.home { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 100px; color: var(--ink-2); font-size: 11px; transition: border-color .3s, color .3s; }
.home:hover { border-color: var(--line-2); color: var(--ink); }
.lang { display: inline-flex; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 100px; background: rgba(5, 4, 12, .6); }
.lang button { white-space: nowrap; font: inherit; font-size: 11px; letter-spacing: .12em; color: var(--ink-3); background: none; border: 0; padding: 5px 9px; border-radius: 100px; cursor: pointer; transition: color .3s, background .3s; }
.lang button:hover { color: var(--ink); }
.lang button.is-active { color: #0a0712; background: linear-gradient(90deg, var(--g1), var(--g2)); }

/* ---------- первый экран ---------- */
section { position: relative; padding: clamp(90px, 14vh, 160px) var(--gutter); }
.hero { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: 120px; }
.hero__inner { max-width: 1400px; width: 100%; margin: 0 auto; }
.hero__status { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); margin-bottom: 28px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--g1); box-shadow: 0 0 0 0 rgba(255, 79, 176, .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(255, 79, 176, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 79, 176, 0); } }
.brand { display: flex; flex-direction: column; line-height: .82; margin: 0 0 36px; }
.brand__q { font-family: var(--f-display); font-weight: 300; font-size: clamp(20px, 2.8vw, 38px); letter-spacing: .5em; color: var(--ink-2); margin: 0 0 .45em .3em; }
.brand__word {
  position: relative; display: inline-block; align-self: flex-start;
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.04em;
  font-size: clamp(76px, 19vw, 300px);
  background: linear-gradient(90deg, var(--g1), var(--g3), var(--g2), var(--g1));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: flow 8s linear infinite;
}
.brand__word::before, .brand__word::after {
  content: attr(data-text); position: absolute; left: 0; top: 0;
  background: inherit; -webkit-background-clip: text; background-clip: text; color: transparent; opacity: 0;
}
.brand__word.glitch::before { opacity: .85; transform: translate(-7px, 2px); clip-path: inset(10% 0 55% 0); filter: hue-rotate(60deg); }
.brand__word.glitch::after { opacity: .85; transform: translate(7px, -2px); clip-path: inset(60% 0 8% 0); filter: hue-rotate(-60deg); }
@keyframes flow { to { background-position: 300% 0; } }
.hero__lead { max-width: 640px; font-size: clamp(18px, 1.9vw, 25px); line-height: 1.45; color: var(--ink-2); margin: 0 0 44px; }
.hero__lead b { color: var(--ink); font-weight: 500; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hud { position: absolute; bottom: 36px; display: grid; gap: 6px; font-size: 10px; color: var(--ink-3); }
.hud--l { left: var(--gutter); }
.hud--r { right: var(--gutter); text-align: right; }
.hud b { color: var(--ink-2); font-weight: 400; }

/* ---------- кнопки ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  padding: 17px 28px; border-radius: 100px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: #0a0712; background: linear-gradient(90deg, var(--g1), var(--g2)); background-size: 200% 100%;
  transition: background-position .6s var(--ease), transform .3s var(--ease), box-shadow .4s;
  box-shadow: 0 0 0 0 rgba(255, 79, 176, 0);
}
.btn:hover { background-position: 100% 0; box-shadow: 0 10px 50px -10px rgba(255, 79, 176, .7); transform: translateY(-2px); }
.btn--ghost { color: var(--ink); background: none; border: 1px solid var(--line-2); }
.btn--ghost:hover { border-color: var(--g2); box-shadow: 0 10px 50px -16px rgba(79, 240, 255, .6); }
.btn i { font-style: normal; transition: transform .3s var(--ease); }
.btn:hover i { transform: translateX(4px); }

/* ---------- заголовки разделов ---------- */
.wrap { max-width: 1400px; margin: 0 auto; }
.label { display: flex; align-items: center; gap: 14px; color: var(--ink-2); margin-bottom: 26px; }
.label span { color: var(--g1); }
.label::after { content: ""; height: 1px; width: 60px; background: var(--line-2); }
.h2 { font-family: var(--f-display); font-weight: 300; letter-spacing: -.03em; line-height: 1.04; font-size: clamp(36px, 6vw, 92px); margin: 0 0 24px; max-width: 14ch; }
.h2 em { font-style: normal; background: linear-gradient(90deg, var(--g1), var(--g2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { max-width: 600px; color: var(--ink-2); font-size: clamp(16px, 1.4vw, 19px); margin: 0 0 60px; }

/* ---------- сигналы (проекты) ---------- */
.signals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.signal { transition: transform .4s var(--ease); }
.signal:hover { transform: translateY(-6px); }
.signal__screen {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; border: 1px solid var(--line);
  background: radial-gradient(ellipse at 50% 120%, rgba(255, 79, 176, .28), transparent 60%), #07050f;
  display: grid; place-items: center; transition: border-color .4s;
}
.signal:hover .signal__screen { border-color: rgba(255, 79, 176, .45); }
.signal__screen::after {
  content: ""; position: absolute; left: 0; right: 0; height: 30%; top: -30%;
  background: linear-gradient(transparent, rgba(79, 240, 255, .12), transparent);
  animation: scanline 3.5s linear infinite;
}
.signal:nth-child(2) .signal__screen::after { animation-delay: -1.2s; }
.signal:nth-child(3) .signal__screen::after { animation-delay: -2.4s; }
@keyframes scanline { to { top: 100%; } }
.signal__noise {
  position: absolute; inset: -20%; opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='turbulence' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noise .6s steps(4) infinite;
}
@keyframes noise { 0% { transform: translate(0, 0); } 25% { transform: translate(-4%, 3%); } 50% { transform: translate(3%, -2%); } 75% { transform: translate(-2%, -4%); } 100% { transform: translate(0, 0); } }
.signal__bars { position: relative; z-index: 2; display: flex; align-items: flex-end; gap: 4px; height: 34px; }
.signal__bars i { width: 5px; background: var(--g2); opacity: .25; animation: bar 1.6s ease-in-out infinite; }
.signal__bars i:nth-child(1) { height: 30%; } .signal__bars i:nth-child(2) { height: 55%; animation-delay: .15s; }
.signal__bars i:nth-child(3) { height: 80%; animation-delay: .3s; } .signal__bars i:nth-child(4) { height: 100%; animation-delay: .45s; }
@keyframes bar { 50% { opacity: .9; } }
.signal__tag { position: absolute; z-index: 2; left: 16px; top: 14px; font-size: 10px; color: var(--ink-3); }
.signal__meta { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 10px; margin: 16px 0 6px; }
.signal__meta b { color: var(--g2); font-weight: 400; }
.signal h3 { font-family: var(--f-display); font-weight: 400; font-size: 22px; margin: 0; letter-spacing: -.01em; }

/* ---------- студия: что мы делаем ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pillar {
  position: relative; overflow: hidden; padding: clamp(26px, 3vw, 44px); min-height: 320px;
  border: 1px solid var(--line); background: rgba(12, 8, 24, .82);
  display: flex; flex-direction: column; justify-content: flex-end; transition: border-color .4s;
}
.pillar:hover { border-color: rgba(79, 240, 255, .35); }
.pillar__idx { position: absolute; top: clamp(26px, 3vw, 44px); left: clamp(26px, 3vw, 44px); color: var(--ink-3); }
.pillar__icon { position: absolute; top: clamp(22px, 3vw, 40px); right: clamp(22px, 3vw, 40px); width: 44px; height: 44px; color: var(--g2); opacity: .8; }
.pillar h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(26px, 2.6vw, 38px); letter-spacing: -.03em; margin: 0 0 12px; line-height: 1.05; }
.pillar p { margin: 0; color: var(--ink-2); }
.pillar__glow {
  position: absolute; width: 360px; height: 360px; border-radius: 50%; pointer-events: none;
  left: var(--mx, 50%); top: var(--my, 50%); transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 79, 176, .22), rgba(79, 240, 255, .08) 40%, transparent 70%);
  opacity: 0; transition: opacity .4s;
}
.pillar:hover .pillar__glow { opacity: 1; }

/* ---------- принципы ---------- */
.principles { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.principle { display: grid; grid-template-columns: 90px 1fr 1.2fr; gap: 24px; align-items: baseline; padding: 30px 0; border-bottom: 1px solid var(--line); }
.principle__n { color: var(--g1); }
.principle h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(22px, 2.4vw, 34px); letter-spacing: -.02em; margin: 0; line-height: 1.1; }
.principle p { margin: 0; color: var(--ink-2); }

/* ---------- связь ---------- */
.cta { text-align: center; padding-bottom: clamp(120px, 20vh, 220px); }
.cta .label { justify-content: center; }
.cta .label::after { display: none; }
.cta .h2 { margin: 0 auto 24px; max-width: 16ch; }
.cta .sub { margin: 0 auto 44px; }
.cta__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }
.cta__mail { display: inline-block; margin-top: 36px; font-family: var(--f-display); font-weight: 300; font-size: clamp(22px, 3.4vw, 48px); letter-spacing: -.02em; color: var(--ink); border-bottom: 1px solid var(--line-2); transition: color .3s, border-color .3s; }
.cta__mail:hover { color: var(--g2); border-color: var(--g2); }

/* ---------- подвал ---------- */
.foot { padding: 34px var(--gutter); border-top: 1px solid var(--line); background: rgba(5, 4, 12, .85); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; color: var(--ink-3); font-size: 10px; }
.foot a { color: var(--ink-2); transition: color .3s; }
.foot a:hover { color: var(--ink); }
.foot__brand { display: flex; align-items: center; gap: 10px; }
.foot__brand svg { height: 20px; width: auto; aspect-ratio: 1492 / 355; }

/* ---------- появление ---------- */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.signals .reveal:nth-child(2), .pillars .reveal:nth-child(2) { transition-delay: .1s; }
.signals .reveal:nth-child(3), .pillars .reveal:nth-child(3) { transition-delay: .2s; }
.hero .reveal:nth-child(2) { transition-delay: .1s; }
.hero .reveal:nth-child(3) { transition-delay: .25s; }
.hero .reveal:nth-child(4) { transition-delay: .4s; }

/* ---------- адаптив ---------- */
@media (max-width: 1000px) {
  .signals, .pillars { grid-template-columns: 1fr 1fr; }
  .signals .signal:last-child { grid-column: span 2; }
  .signals .signal:last-child .signal__screen { aspect-ratio: 16 / 9; }
  .pillars .pillar:last-child { grid-column: span 2; }
}
@media (max-width: 760px) {
  .nav__links, .home { display: none; }   /* ссылка на Qilas — в подвале и в разделе «Связь» */
  .nav { padding: 14px var(--gutter); gap: 10px; }
  .nav__lockup { height: 21px; }
  .nav__div { font-size: 11px; }
  .lang button { padding: 5px 7px; font-size: 10px; letter-spacing: .08em; }
  .signals, .pillars { grid-template-columns: 1fr; }
  .signals .signal:last-child, .pillars .pillar:last-child { grid-column: auto; }
  .signal__screen, .signals .signal:last-child .signal__screen { aspect-ratio: 16 / 10; }
  .pillar { min-height: 240px; }
  .principle { grid-template-columns: 1fr; gap: 10px; }
  .hud--r { display: none; }
  .warp { opacity: .6; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
