/* Те же токены, что в лаунчере (src/styles/main.scss) */
:root {
  --ink: #0c0c0d;
  --ink-2: #131314;
  --ink-3: #1b1b1d;
  --paper: #ecebe6;
  --acid: #d4ff3c;
  --ember: #ff5a36;
  --line: rgba(236, 235, 230, 0.12);
  --mute: rgba(236, 235, 230, 0.56);
  --faint: rgba(236, 235, 230, 0.34);
  --display: "Unbounded Variable", "Onest Variable", sans-serif;
  --sans: "Onest Variable", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono Variable", "Cascadia Mono", Consolas, monospace;
  --ease-out: cubic-bezier(0.2, 0.7, 0, 1);
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--acid);
  color: var(--ink);
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

svg {
  flex-shrink: 0;
  fill: currentColor;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}

.acid {
  color: var(--acid);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn .push {
  margin-left: 12px;
  transition: transform 0.3s var(--ease-out);
}

.btn:hover .push {
  transform: translateY(3px);
}

.btn-small {
  height: 34px;
  padding: 0 14px;
  font-size: 11px;
}

.btn-big {
  height: 60px;
  padding: 0 26px;
  font-size: 15px;
}

.btn-primary {
  background: var(--acid);
  color: var(--ink);
}

.btn-primary:hover {
  background: #c3ef2a;
}

.btn-ghost {
  border-color: rgba(236, 235, 230, 0.3);
  color: var(--paper);
}

.btn-ghost:hover {
  background: rgba(236, 235, 230, 0.06);
  border-color: var(--paper);
}

.btn-dark {
  background: var(--ink);
  color: var(--paper);
}

.btn-dark:hover {
  background: #232325;
}

/* ---------- Шапка ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 56px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--ink);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
}

.nav a {
  text-decoration: none;
  transition: color 0.15s;
}

.nav a:hover {
  color: var(--paper);
}

/* ---------- Первый экран ---------- */

.hero {
  position: relative;
  min-height: calc(100svh - 56px);
  display: flex;
  overflow: hidden;
}

.hero > .terrain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: reveal 1.1s var(--ease-out) both;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 12, 13, 0.94) 0%, rgba(12, 12, 13, 0.6) 45%, rgba(12, 12, 13, 0.1) 80%),
    linear-gradient(0deg, rgba(12, 12, 13, 0.9) 0%, rgba(12, 12, 13, 0) 40%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  align-items: end;
  gap: 48px;
  padding: 96px var(--gutter) 64px;
}

.kicker {
  margin: 0 0 22px;
}

.display {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.hero .display {
  font-size: clamp(40px, 9.4vw, 152px);
  animation: rise 0.8s var(--ease-out) both;
}

.lead {
  max-width: 50ch;
  margin: 28px 0 34px;
  color: rgba(236, 235, 230, 0.76);
  font-size: clamp(16px, 1.3vw, 18px);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.meta {
  margin: 18px 0 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: scale(1.04);
  }
}

/* ---------- Окно лаунчера на первом экране ---------- */

.app {
  margin: 0;
  border: 1px solid rgba(236, 235, 230, 0.18);
  background: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  font-size: 11px;
  animation: rise 0.9s 0.15s var(--ease-out) both;
}

.app .label {
  font-size: 8.5px;
}

.app-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}

.app-brand {
  font-family: var(--display);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--paper);
}

.dot {
  width: 5px;
  height: 5px;
  background: var(--acid);
}

.app-controls {
  margin-left: 14px;
  letter-spacing: 0.3em;
}

.app-stage {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.app-stage .terrain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.app-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12, 12, 13, 0.9) 0%, rgba(12, 12, 13, 0.3) 60%, rgba(12, 12, 13, 0) 100%);
}

.app-hero {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.app-title {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.app-dock {
  display: grid;
  grid-template-columns: 1fr 0.7fr 1.2fr 1fr;
  height: 52px;
  border-top: 1px solid var(--line);
}

.app-dock > * + * {
  border-left: 1px solid var(--line);
}

.app-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 0 12px;
  min-width: 0;
}

.app-cell b {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 500;
}

.app-cell .bright {
  color: var(--paper);
}

.app-play {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: var(--acid);
  color: var(--ink);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Бегущая строка ---------- */

.ticker {
  display: flex;
  overflow: hidden;
  height: 44px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.ticker-track {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  animation: ticker 40s linear infinite;
}

.ticker-track span {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  padding-right: 26px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ticker-track svg {
  width: 10px;
  height: 10px;
  color: var(--acid);
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Разделы ---------- */

.section {
  padding: clamp(72px, 10vw, 128px) var(--gutter) 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 3fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 48px;
}

.h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(32px, 4.6vw, 64px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.grid {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.features {
  grid-template-columns: repeat(3, 1fr);
}

.steps {
  grid-template-columns: repeat(3, 1fr);
}

.cell {
  position: relative;
  padding: 28px 28px 34px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 0.2s;
}

.cell::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--acid);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}

.cell:hover {
  background: rgba(236, 235, 230, 0.025);
}

.cell:hover::before {
  transform: scaleX(1);
}

.cell h3 {
  margin: 44px 0 10px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
}

.cell p {
  margin: 0;
  max-width: 38ch;
  color: var(--mute);
}

/* Контурные цифры. У вариативного шрифта контуры букв перекрываются, и голая обводка
   рисует внутренние стыки. Поэтому обводка идёт под заливкой цветом фона: внутренние
   линии закрываются, снаружи остаётся ровный контур. */
.step-num {
  display: block;
  font-family: var(--display);
  font-size: clamp(56px, 7vw, 96px);
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  -webkit-text-stroke: 2px rgba(236, 235, 230, 0.4);
  paint-order: stroke fill;
}

.steps .cell:hover {
  background: none;
}

.steps .cell h3 {
  margin-top: 28px;
}

/* ---------- Сборки ---------- */

.packs {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.pack {
  display: grid;
  grid-template-columns: 64px minmax(0, 2fr) minmax(0, 1.2fr) 110px;
  gap: 24px;
  align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.pack h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 600;
  line-height: 1.1;
  text-transform: uppercase;
}

.pack p {
  margin: 8px 0 0;
  color: var(--mute);
}

.pack .mods {
  text-align: right;
  color: var(--paper);
}

/* ---------- Вопросы ---------- */

.faq {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary svg {
  color: var(--acid);
  transition: transform 0.3s var(--ease-out);
}

.faq details[open] summary svg {
  transform: rotate(45deg);
}

.faq details p {
  max-width: 64ch;
  margin: -6px 0 26px;
  color: var(--mute);
}

/* ---------- Финальный блок ---------- */

.final {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-top: clamp(80px, 11vw, 140px);
  padding: clamp(56px, 8vw, 96px) var(--gutter);
  background: var(--acid);
  color: var(--ink);
}

.final-title {
  font-size: clamp(48px, 9vw, 140px);
}

.final-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.final .label {
  color: rgba(12, 12, 13, 0.6);
}

/* ---------- Подвал ---------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 28px;
  padding: 26px var(--gutter);
}

/* ---------- Появление при прокрутке ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Адаптивность ---------- */

@media (max-width: 1100px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    align-content: end;
  }

  .app {
    max-width: 560px;
  }
}

@media (max-width: 860px) {
  .nav {
    display: none;
  }

  .topbar .btn-small {
    margin-left: auto;
  }

  .features,
  .steps {
    grid-template-columns: 1fr 1fr;
  }

  .section-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .pack {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px 16px;
  }

  .pack .spec,
  .pack .mods {
    grid-column: 2;
    text-align: left;
  }
}

@media (max-width: 560px) {
  .wordmark .label {
    display: none;
  }

  .hero-inner {
    padding-top: 64px;
  }

  .app {
    display: none;
  }

  .btn-big {
    width: 100%;
    justify-content: center;
    padding: 0 18px;
    font-size: 13px;
  }

  .btn-big .push {
    margin-left: auto;
  }

  .features,
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .final-side,
  .final-side .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
