/* Оболочка витрины: верхняя полоса с переключателем проектов и шторка перехода.
   Каждый проект рисует себя внутри #stage и сам отвечает за свои стили (классы с префиксом проекта). */
:root {
  --sx-h: 40px;
  --sx-bg: #07060f;
  --sx-ink: #f4f2ff;
  --sx-dim: rgba(244, 242, 255, 0.62);
  --sx-accent: #c6ff3d;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sx-bg);
  color: var(--sx-ink);
  font: 400 16px/1.5 'Onest', system-ui, sans-serif;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; }
a { color: inherit; }

.sx-bar {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--sx-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 16px;
  background: rgba(7, 6, 15, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}
.sx-brand {
  text-decoration: none; font: 800 13px/1 'Unbounded', sans-serif; letter-spacing: 0.08em;
  display: flex; align-items: baseline; gap: 8px; white-space: nowrap;
}
.sx-brand span { font: 400 12px/1 'Onest', sans-serif; letter-spacing: 0; color: var(--sx-dim); }
.sx-made { color: var(--sx-dim); text-decoration: none; white-space: nowrap; }
.sx-made:hover, .sx-made:focus-visible { color: var(--sx-accent); }

.sx-switch { display: flex; align-items: center; gap: 10px; }
/* Одна кнопка: следующий проект по кругу */
.sx-next {
  display: inline-flex; align-items: center; gap: 8px;
  height: 28px; padding: 0 12px 0 6px;
  border: 1px solid rgba(198, 255, 61, 0.55); border-radius: 999px;
  background: rgba(198, 255, 61, 0.08); cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.sx-next:hover, .sx-next:focus-visible { background: rgba(198, 255, 61, 0.18); }
.sx-next:active { transform: scale(0.97); }
.sx-next__num {
  display: inline-grid; place-items: center; min-width: 22px; height: 18px; padding: 0 4px;
  border-radius: 999px; background: var(--sx-accent); color: #0b0a14;
  font: 800 10px/1 'Unbounded', sans-serif;
}
.sx-next__name { font-weight: 600; }
.sx-next__arrow { color: var(--sx-accent); transition: transform 0.2s; }
.sx-next:hover .sx-next__arrow { transform: translateX(3px); }

/* Прямой выбор проекта — на широких экранах */
.sx-tabs { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.sx-tabs button {
  height: 28px; padding: 0 10px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--sx-dim); font-size: 12px;
}
.sx-tabs button b { font: 800 10px/1 'Unbounded', sans-serif; margin-right: 6px; }
.sx-tabs button:hover, .sx-tabs button:focus-visible { color: var(--sx-ink); background: rgba(255, 255, 255, 0.06); }
.sx-tabs button[aria-current='true'] { color: var(--sx-ink); background: rgba(255, 255, 255, 0.1); }
.sx-tabs button[data-soon]::after { content: ' · скоро'; color: rgba(244, 242, 255, 0.38); }

.sx-stage { min-height: 100vh; }

/* Шторка: закрывает экран, пока один проект сменяет другой */
.sx-curtain {
  position: fixed; inset: 0; z-index: 200; pointer-events: none;
  display: grid; place-content: center; justify-items: center; gap: 6px;
  background: #0b0a14;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.45s cubic-bezier(0.7, 0, 0.3, 1);
}
.sx-curtain.is-in { clip-path: inset(0 0 0 0); }
.sx-curtain.is-out { clip-path: inset(100% 0 0 0); }
.sx-curtain__num { font: 800 clamp(64px, 14vw, 180px)/0.9 'Unbounded', sans-serif; color: var(--sx-accent); }
.sx-curtain__name { font: 600 clamp(16px, 2vw, 22px)/1 'Onest', sans-serif; letter-spacing: 0.3em; text-transform: uppercase; }

@media (max-width: 900px) {
  .sx-tabs { display: none; }
  .sx-made { font-size: 12px; }
}
@media (max-width: 600px) {
  /* на телефоне ссылка на студию — в финале проекта, полоса остаётся с брендом и переключателем */
  .sx-made { display: none; }
  .sx-brand span { display: none; }
  .sx-bar { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .sx-curtain { transition-duration: 0.01s; }
}
