/* ============================================================
   ИГРОВОЙ ХАБ — Олег Воронов
   Вайт лейбл разработка игр.
   Подача сдержанная: тёмная база, сетка, акцент по делу.
   ============================================================ */

/* ---------- 1. ТОКЕНЫ ---------- */
:root {
  --bg:      #0a0b0f;
  --bg-2:    #0e1016;
  --surface: rgba(255,255,255,.028);
  --surface-2: rgba(255,255,255,.055);
  --line:    rgba(255,255,255,.09);
  --line-2:  rgba(255,255,255,.16);

  --accent: #00f0ff;

  --text:   #e7e9ef;
  --muted:  #8b909e;
  --muted-2:#616673;

  --f-display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;

  --pad: clamp(20px, 5vw, 72px);
  --maxw: 1240px;

  --ease: cubic-bezier(.22,1,.36,1);
}

/* ---------- 2. БАЗА ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-mono);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

h1, h2, h3 { font-family: var(--f-display); margin: 0; line-height: 1.1; letter-spacing: -.025em; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font: inherit; color: inherit; }
dl, dd { margin: 0; }

::selection { background: var(--accent); color: #000; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.skip {
  position: fixed; top: -100px; left: 16px; z-index: 200;
  background: var(--accent); color: #000; padding: 10px 16px; border-radius: var(--r-sm);
  font-weight: 700; transition: top .2s;
}
.skip:focus { top: 16px; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: #262a36; border-radius: 99px; border: 2px solid var(--bg-2); }
::-webkit-scrollbar-thumb:hover { background: #343a49; }

/* ---------- 3. ФОН ---------- */
.bg { position: fixed; inset: 0; z-index: -1; background: var(--bg); overflow: hidden; }

.bg__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 55%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 55%);
}

.bg__scan {
  position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 3px, rgba(0,0,0,.14) 3px 4px);
}

/* ---------- 4. ШАПКА ---------- */
.nav {
  position: sticky; top: 0; z-index: 90;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  background: rgba(10,11,15,.8);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.is-stuck { border-bottom-color: var(--line); background: rgba(10,11,15,.94); }

.nav__in {
  max-width: var(--maxw); margin: 0 auto; padding: 15px var(--pad);
  display: flex; align-items: center; gap: 32px;
}

.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.brand__mark { color: var(--accent); display: grid; place-items: center; }
.brand__txt { display: flex; flex-direction: column; line-height: 1.2; }
.brand__txt b { font-family: var(--f-display); font-size: 12.5px; font-weight: 800; letter-spacing: .03em; }
.brand__txt i { font-style: normal; font-size: 9.5px; color: var(--muted-2); letter-spacing: .14em; text-transform: uppercase; }

.nav__links { display: flex; gap: 28px; }
.nav__links a {
  font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--muted);
  padding: 4px 0; position: relative; transition: color .2s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--accent); transition: width .3s var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { width: 100%; }

.nav__cta {
  font-size: 12.5px; font-weight: 500; letter-spacing: .02em;
  padding: 9px 16px; border: 1px solid var(--line-2); border-radius: 99px;
  transition: border-color .25s, color .25s, background .25s;
}
.nav__cta:hover { border-color: var(--accent); color: var(--accent); background: rgba(0,240,255,.06); }

@media (max-width: 900px) { .nav__links { display: none; } }
@media (max-width: 420px) { .brand__txt i { display: none; } }

/* ---------- 5. КНОПКИ ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 12px; font-weight: 500; letter-spacing: .04em;
  padding: 13px 22px; border-radius: 99px; border: 1px solid var(--line-2);
  background: var(--surface); cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s, color .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--accent); color: var(--accent); }

.btn--primary {
  background: var(--text); color: #0a0b0f; border-color: var(--text); font-weight: 700;
}
.btn--primary:hover { background: var(--accent); border-color: var(--accent); color: #000; }

.btn--plain { background: none; border-color: transparent; color: var(--muted); padding-left: 8px; padding-right: 8px; }
.btn--plain:hover { background: none; color: var(--text); transform: none; }

.iconbtn {
  width: 36px; height: 36px; display: grid; place-items: center; flex: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px;
  color: var(--muted); cursor: pointer; transition: all .2s;
}
.iconbtn:hover { color: var(--accent); border-color: var(--accent); }
.iconbtn--x:hover { color: #ff5c7a; border-color: #ff5c7a; }

kbd {
  font-family: var(--f-mono); font-size: .8em; padding: 2px 7px; border-radius: 4px;
  background: var(--surface-2); border: 1px solid var(--line-2);
}

/* ---------- 6. ГЛАВНЫЙ БЛОК ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(64px, 13vh, 140px) var(--pad) clamp(56px, 9vh, 96px);
}
.hero__in { max-width: 860px; }

.hero__kicker {
  font-size: 10.5px; font-weight: 500; letter-spacing: .26em; color: var(--accent);
  margin: 0 0 26px; padding-bottom: 14px; position: relative;
}
.hero__kicker::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 46px; height: 1px;
  background: var(--accent);
}

.hero__title {
  font-size: clamp(34px, 7.4vw, 74px); font-weight: 800; letter-spacing: -.035em;
  margin: 0 0 30px; text-transform: uppercase;
}

.hero__sub {
  max-width: 600px; font-size: clamp(14px, 1.5vw, 16px);
  color: var(--muted); line-height: 1.8;
}

.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 34px 0 56px; }

/* блок фактов идёт сразу за заголовком — отступ задаём здесь */
.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0; margin: 56px 0 0; border-top: 1px solid var(--line);
}
.facts > div { padding: 20px 22px 0 0; }
.facts dt { font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 7px; }
.facts dd { font-size: 13.5px; color: var(--text); line-height: 1.55; }

/* ---------- 7. СЕКЦИИ ---------- */
.sec { max-width: var(--maxw); margin: 0 auto; padding: clamp(48px, 8vh, 88px) var(--pad); }
.sec__head { margin-bottom: 40px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 26px; }
.sec__title { font-size: clamp(20px, 3.2vw, 30px); font-weight: 800; display: flex; align-items: baseline; gap: 15px; }
.sec__num { font-family: var(--f-mono); font-size: 12px; font-weight: 500; color: var(--accent); letter-spacing: .1em; }
.sec__note { font-size: 12px; color: var(--muted-2); margin: 0 0 0 auto; }

/* ---------- 8. УСЛУГИ ---------- */
.svc { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 0 44px; }
.svc__item {
  padding: 28px 0 30px; border-top: 1px solid var(--line);
  transition: border-color .3s;
}
.svc__item:hover { border-top-color: var(--accent); }
.svc__n {
  display: block; font-size: 10.5px; font-weight: 500; letter-spacing: .14em;
  color: var(--accent); margin-bottom: 14px;
}
.svc__item h3 { font-size: 16.5px; font-weight: 600; margin-bottom: 10px; line-height: 1.35; }
.svc__item p { font-size: 13.5px; color: var(--muted); line-height: 1.75; margin: 0; max-width: 44ch; }

/* ---------- 9. КЕЙСЫ ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid__empty { grid-column: 1/-1; color: var(--muted-2); font-size: 13px; padding: 40px 0; }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  transition: transform .35s var(--ease), border-color .3s, background .3s;
  isolation: isolate;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-2); background: var(--surface-2); }

.card__cover { position: relative; aspect-ratio: 16/10; overflow: hidden; background: #08090d; }
.card__cover svg { width: 100%; height: 100%; display: block; transition: transform .6s var(--ease); }
.card:hover .card__cover svg { transform: scale(1.04); }
.card__cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,9,13,.94) 2%, rgba(8,9,13,.2) 42%, transparent 72%);
}

.card__badges { position: absolute; top: 12px; left: 12px; z-index: 2; display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
  font-size: 9px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 99px;
  background: rgba(10,11,15,.7); border: 1px solid var(--line-2); color: var(--muted);
  backdrop-filter: blur(6px);
}
.badge--live { color: #7ef2b0; border-color: rgba(126,242,176,.35); }
.badge--wip  { color: #ffc964; border-color: rgba(255,201,100,.35); }

.card__play { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; opacity: 0; transition: opacity .3s; }
.card:hover .card__play { opacity: 1; }
.card__playbtn {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--acc, var(--accent)); color: #06070a; transform: scale(.82); transition: transform .3s var(--ease);
}
.card:hover .card__playbtn { transform: scale(1); }

.card__hit { position: absolute; inset: 0; z-index: 4; cursor: pointer; }

.card__body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card__title { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.card__idx { font-size: 10.5px; color: var(--muted-2); flex: none; padding-top: 4px; letter-spacing: .1em; }
.card__desc { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin: 0; flex: 1; }
.card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.card__tag {
  font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2);
  border: 1px solid var(--line); border-radius: 4px; padding: 3px 7px;
}
.card__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 3px; padding-top: 13px; border-top: 1px solid var(--line);
  font-size: 10px; letter-spacing: .1em; color: var(--muted-2); text-transform: uppercase;
}
.card__go { color: var(--acc, var(--accent)); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.card__go svg { transition: transform .3s var(--ease); }
.card:hover .card__go svg { transform: translateX(4px); }

.card--wip::before {
  content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: repeating-linear-gradient(-45deg, rgba(255,201,100,.035) 0 10px, transparent 10px 20px);
}
.card__prog { height: 2px; background: var(--surface-2); overflow: hidden; }
.card__prog i { display: block; height: 100%; background: #ffc964; }
.card__prog-txt { font-size: 9.5px; letter-spacing: .12em; color: #ffc964; text-transform: uppercase; }

/* ---------- 10. ПРОЦЕСС ---------- */
.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.steps li {
  display: grid; grid-template-columns: 90px 1fr; gap: 0 24px; align-items: start;
  padding: 26px 0; border-bottom: 1px solid var(--line);
}
.steps__n { font-size: 12px; font-weight: 500; color: var(--accent); letter-spacing: .1em; padding-top: 3px; }
.steps h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.steps p { font-size: 13.5px; color: var(--muted); line-height: 1.75; margin: 0; max-width: 62ch; }

/* ---------- 11. КОНТАКТЫ ---------- */
.sec--contact { border-top: 1px solid var(--line); }
.contact { max-width: 700px; }
.contact__lead { font-size: 14.5px; color: var(--muted); line-height: 1.8; }

.contact__list { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin: 30px 0 28px; }
.contact__row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
  transition: padding-left .3s var(--ease), color .3s;
}
.contact__row:hover { padding-left: 10px; color: var(--accent); }
.contact__k { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); flex: none; }
.contact__v { font-family: var(--f-display); font-size: clamp(15px, 2.4vw, 21px); font-weight: 600; letter-spacing: -.015em; }
.contact__row:hover .contact__k { color: var(--accent); }
.contact__row:hover .contact__v { color: var(--accent); }

.contact__note { font-size: 12px; color: var(--muted-2); line-height: 1.8; margin: 0; max-width: 58ch; }

@media (max-width: 560px) {
  .contact__row { flex-direction: column; gap: 6px; }
  .steps li { grid-template-columns: 56px 1fr; gap: 0 14px; }
}

/* ---------- 12. ПОДВАЛ ---------- */
.foot { border-top: 1px solid var(--line); }
.foot__in {
  max-width: var(--maxw); margin: 0 auto; padding: 24px var(--pad);
  display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center;
  font-size: 10.5px; letter-spacing: .12em; color: var(--muted-2); text-transform: uppercase;
}
.foot__mid { margin: 0 auto; }
.foot a { transition: color .2s; }
.foot a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .foot__in { flex-direction: column; align-items: flex-start; }
  .foot__mid { margin: 0; }
}

/* ---------- 13. ПЛЕЕР ---------- */
.player { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: clamp(10px, 3vw, 34px); }
.player[hidden] { display: none; }
.player.is-open { animation: fadeIn .25s var(--ease); }
.player.is-closing { animation: fadeOut .2s var(--ease) forwards; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }

.player__scrim { position: absolute; inset: 0; background: rgba(4,5,8,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

.player__box {
  position: relative; width: min(1180px, 100%); height: min(88vh, 100%);
  display: flex; flex-direction: column; overflow: hidden;
  background: #08090d; border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: 0 40px 100px -30px rgba(0,0,0,1);
  animation: popIn .35s var(--ease);
}
@keyframes popIn { from { opacity: 0; transform: scale(.97) translateY(10px); } }

.player__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 11px 12px 11px 18px; border-bottom: 1px solid var(--line); flex: none;
}
.player__id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player__swatch { width: 3px; height: 28px; border-radius: 99px; background: var(--accent); flex: none; }
.player__id b { display: block; font-family: var(--f-display); font-size: 13px; font-weight: 600; }
.player__id i { display: block; font-style: normal; font-size: 9.5px; letter-spacing: .12em; color: var(--muted-2); text-transform: uppercase; margin-top: 2px; }
.player__tools { display: flex; align-items: center; gap: 8px; flex: none; }
.player__hint {
  font-size: 10px; color: var(--muted-2); letter-spacing: .08em; margin-right: 6px;
  max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.player__stage { position: relative; flex: 1; min-height: 0; background: #08090d; }
.player__stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.player__loading {
  position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 14px;
  background: #08090d; color: var(--muted-2);
  font-size: 9.5px; letter-spacing: .22em; transition: opacity .35s;
}
.player__loading i { font-style: normal; }
.player__loading.is-gone { opacity: 0; pointer-events: none; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .player { padding: 0; }
  .player__box { height: 100%; width: 100%; border-radius: 0; border: 0; }
  .player__hint { display: none; }
  .player__bar { padding: 10px 10px 10px 14px; }
}

/* ---------- 14. ПОЯВЛЕНИЕ ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- 15. ДОСТУПНОСТЬ ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
