/* Сайт MusiMuX. Токены повторяют палитру приложения (src/styles/app.css),
   чтобы макет окна и сам сайт выглядели как одно целое. */

/* Inter Variable лежит рядом, в fonts/: сайт не обращается за шрифтом
   к чужим серверам. Подмножества грузятся по unicode-range — русскому
   тексту нужны cyrillic и latin, остальные подтянутся только при нужде */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/inter-cyrillic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/inter-cyrillic-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/inter-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;

  --bg:             #09090b;
  --bg-surface:     #111114;
  --bg-elevated:    #18181c;
  --bg-hover:       #1f1f25;
  --border:         #222228;
  --border-subtle:  #1a1a20;
  --text:           #f0f0f5;
  --text-secondary: #8e8ea0;
  --text-muted:     #55556a;
  --accent:         #4169e1;
  --accent-hover:   #3759c9;
  --accent-2:       #6f8fff;
  --accent-glow:    rgba(65, 105, 225, 0.18);
  --warn:           #f59e0b;
  --success:        #22c55e;
  --radius:         12px;
  --radius-sm:      8px;
  --radius-xs:      4px;
  --ease:           cubic-bezier(0.16, 1, 0.3, 1);
  --font: 'Inter Variable', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto,
    'Helvetica Neue', sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;

  --nav-h: 60px;
  --content: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

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

::selection { background: rgba(65, 105, 225, 0.35); color: #fff; }

a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }
svg { display: block; flex-shrink: 0; }

.wrap { width: min(var(--content), 100% - 40px); margin: 0 auto; }

/* ---------- Шапка сайта ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  height: var(--nav-h);
  background: rgba(9, 9, 11, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 100%; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; justify-self: start; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; display: block; }
.nav-links { display: flex; gap: 22px; font-size: 14px; color: var(--text-secondary); }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-right { justify-self: end; display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none; width: 36px; height: 36px;
  border: none; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-secondary); cursor: pointer;
}
.nav-toggle:hover { background: var(--bg-hover); color: var(--text); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-elevated); color: var(--text);
  font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn:hover { background: var(--bg-hover); border-color: #2c2c34; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.btn.ghost:hover { background: var(--bg-hover); color: var(--text); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.lg { height: 46px; padding: 0 24px; font-size: 15px; }

/* ---------- Секции ---------- */
.section { padding: 88px 0; }
.section + .section { border-top: 1px solid var(--border-subtle); }
.section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.eyebrow {
  display: inline-block; margin-bottom: 12px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-2);
}
.section-head h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 700; margin-bottom: 12px; }
.section-head p { color: var(--text-secondary); font-size: 16px; }

/* ---------- Главный экран ---------- */
.hero { padding: 96px 0 56px; text-align: center; position: relative; }
.hero::before {
  content: ""; position: absolute; inset: auto 0 0; height: 520px; top: -120px;
  background: radial-gradient(ellipse 600px 360px at 50% 20%, rgba(65, 105, 225, 0.14), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero-icon {
  display: block; width: 88px; height: 88px; margin: 0 auto 24px; border-radius: 22px;
  box-shadow: 0 12px 40px rgba(65, 105, 225, 0.25), 0 0 0 1px var(--border-subtle);
}
.hero-icon.sm { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 20px; }
.hero h1 {
  font-size: clamp(36px, 6vw, 60px); font-weight: 800; line-height: 1.05;
  letter-spacing: -0.03em; max-width: 760px; margin: 0 auto 20px;
}
.hero h1 em { font-style: normal; color: var(--accent-2); }
.hero .lead { max-width: 600px; margin: 0 auto 32px; font-size: 17px; color: var(--text-secondary); }
.hero-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.hero-meta {
  display: flex; justify-content: center; gap: 20px; flex-wrap: wrap;
  margin-top: 26px; font-size: 13px; color: var(--text-muted);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.version-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 8px; margin-bottom: 24px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg-surface); font-size: 12px; color: var(--text-secondary);
}
.version-pill b { color: var(--text); font-weight: 600; }
.scroll-hint {
  display: inline-flex; flex-direction: column; align-items: center; gap: 10px;
  margin-top: 56px; font-size: 10px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-muted); transition: color 150ms ease;
}
.scroll-hint:hover { color: var(--text-secondary); }
.scroll-hint .mouse {
  width: 20px; height: 32px; border: 1px solid #3f3f46; border-radius: 999px;
  display: flex; justify-content: center; padding-top: 5px;
}
.scroll-hint .mouse i { width: 4px; height: 6px; border-radius: 2px; background: #71717a; animation: scroll-dot 1.4s ease-in-out infinite; }
@keyframes scroll-dot { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(6px); opacity: 0.5; } }
.version-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

/* ---------- Скриншоты приложения ---------- */
.shot { padding: 24px 0 64px; }
.shot-head { text-align: center; margin: 0 auto 24px; }
.shot-head h2 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 8px; }
.shot-head p, .shot-caption { color: var(--text-secondary); }
.shot-scenes { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.shot-scenes[hidden] { display: none; }
.shot-scenes button {
  padding: 9px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-surface); color: var(--text-secondary); cursor: pointer;
}
.shot-scenes button:hover { background: var(--bg-hover); color: var(--text); }
.shot-scenes button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-glow); color: var(--text); }
.shot-scenes button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.shot-caption { margin-top: 22px; text-align: center; font-size: 14px; }
.shot-caption b { color: var(--text); }
.shot-caption [hidden] { display: none; }
.shot-frame {
  position: relative; width: 100%;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 6px rgba(255, 255, 255, 0.02);
}
/* Скриншоты сняты в 1920 px и ужаты в WebP на ширину 1600: кадр просто
   показывает картинку во всю ширину контейнера */
.shot-frame img { display: block; width: 100%; height: auto; }
.shot-frame img[hidden] { display: none; }
.author-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #3b4b8a, #6f8fff); flex-shrink: 0;
}

/* ---------- Карточки возможностей ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
/* Неполный последний ряд: одна плитка из трёх оставляла бы дырку справа,
   поэтому последняя карточка занимает всю ширину и читается лентой */
.features > .feature:last-child:nth-child(3n + 1) { grid-column: 1 / -1; }
.features > .feature:last-child:nth-child(3n + 1) p { max-width: 78ch; }
/* Две плитки в последнем ряду: вторая растягивается на оставшиеся колонки */
.features > .feature:last-child:nth-child(3n + 2) { grid-column: span 2; }
.feature {
  padding: 22px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-surface);
  transition: border-color 150ms ease, background 150ms ease;
}
.feature:hover { border-color: #2c2c34; background: var(--bg-elevated); }
.feature .ic {
  width: 40px; height: 40px; border-radius: var(--radius-sm); margin-bottom: 16px;
  display: grid; place-items: center;
  background: var(--accent-glow); color: var(--accent-2);
}
.feature h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.feature p { font-size: 14px; color: var(--text-secondary); }

/* ---------- Принципы (две колонки) ---------- */
.points { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.point {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-surface);
}
.point .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-glow); }
.point h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.point p { font-size: 14px; color: var(--text-secondary); }

/* ---------- Технологии ---------- */
.stack { display: flex; align-items: stretch; justify-content: center; gap: 10px; }
.stack-card {
  flex: 1; max-width: 300px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 22px 18px; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-surface);
}
.stack-card code {
  font-family: var(--mono); font-size: 13px; color: var(--accent-2);
  background: var(--accent-glow); border-radius: 6px; padding: 3px 8px; margin-bottom: 6px;
}
.stack-card b { font-size: 15px; font-weight: 600; }
.stack-card span { font-size: 13px; color: var(--text-secondary); }
.stack-arrow { display: grid; place-items: center; color: var(--text-muted); flex-shrink: 0; }

/* ---------- Частые вопросы ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-surface);
}
.faq details + details { margin-top: 10px; }
.faq summary { cursor: pointer; font-size: 15px; font-weight: 600; }
.faq summary:hover { color: var(--accent-2); }
.faq details p { margin-top: 8px; font-size: 14.5px; color: var(--text-secondary); }

/* ---------- Обратная связь ---------- */
.links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.link-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 22px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-surface);
  transition: border-color 150ms ease, background 150ms ease;
}
.link-card:hover { border-color: var(--accent); background: var(--bg-elevated); }
.link-card .top { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.link-card .top svg { color: var(--accent-2); }
.link-card p { font-size: 14px; color: var(--text-secondary); }
.link-card .go { margin-top: auto; font-size: 13px; color: var(--accent-2); }

/* ---------- Страница «Скачать» ---------- */
.page-head { padding: 72px 0 36px; text-align: center; }
.page-head h1 { font-size: clamp(30px, 4.5vw, 44px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }
.page-head p { color: var(--text-secondary); font-size: 16px; max-width: 560px; margin: 0 auto; }
.narrow { width: min(760px, 100% - 40px); margin: 0 auto; }

.os-tabs { display: flex; justify-content: center; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.os-tab {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 16px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-surface); color: var(--text-secondary);
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.os-tab:hover { background: var(--bg-hover); color: var(--text); }
.os-tab.active { background: rgba(65, 105, 225, 0.14); border-color: rgba(65, 105, 225, 0.45); color: var(--text); }

.panel { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-surface); }
.panel[hidden] { display: none; }
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dl-grid + .dl-grid { margin-top: 10px; }
.dl {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-elevated);
  transition: border-color 120ms ease, background 120ms ease;
}
.dl:hover { border-color: var(--accent); background: var(--bg-hover); }
.dl .ic {
  width: 38px; height: 38px; border-radius: var(--radius-sm); display: grid; place-items: center;
  background: var(--accent-glow); color: var(--accent-2); flex-shrink: 0;
}
.dl b { display: block; font-size: 14px; font-weight: 600; }
.dl span { font-size: 12.5px; color: var(--text-secondary); }
.dl .tag {
  margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent-2); border: 1px solid rgba(65, 105, 225, 0.4); border-radius: 999px; padding: 2px 8px;
}
.panel-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-muted);
}
.panel-foot a { color: var(--text-secondary); }
.panel-foot a:hover { color: var(--text); }

/* Команды установки внутри карточки системы: блок копируется целиком,
   версия в именах файлов — спаны data-version, их проставляет релизный CI */
.install { margin-top: 16px; }
.install > * + * { margin-top: 8px; }
.install p { font-size: 13.5px; color: var(--text-secondary); }
.install pre {
  padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-elevated); overflow-x: auto;
}
.install code { font-family: var(--mono); font-size: 12.5px; color: var(--text); }
.install p code { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }

.notice {
  display: flex; gap: 12px; margin-top: 18px; padding: 14px 16px;
  border: 1px solid rgba(245, 158, 11, 0.3); border-radius: var(--radius);
  background: rgba(245, 158, 11, 0.06); color: var(--text-secondary); font-size: 13.5px;
}
.notice svg { color: var(--warn); margin-top: 2px; }
.notice b { color: var(--text); font-weight: 600; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 48px; }
.step { padding: 20px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-surface); }
.step .n { font-size: 12px; font-weight: 700; color: var(--accent-2); margin-bottom: 8px; }
.step h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.step p { font-size: 13.5px; color: var(--text-secondary); }

/* ---------- Страница «О проекте» ---------- */
.prose { width: min(760px, 100% - 40px); margin: 0 auto; }
.prose section {
  padding: 26px 28px; margin-bottom: 14px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-surface);
}
.prose h2 { font-size: 19px; font-weight: 700; margin-bottom: 12px; }
.prose p { color: var(--text-secondary); font-size: 15px; }
.prose p + p { margin-top: 12px; }
.prose p b { color: var(--text); font-weight: 600; }
.prose code { font-family: var(--mono); font-size: 0.92em; color: var(--text); background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }
.check { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; margin-top: 18px; text-align: left; }
.check li { display: flex; gap: 10px; font-size: 14.5px; color: var(--text-secondary); }
.stack-list { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.stack-list div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; text-align: left; font-size: 14.5px; padding: 10px 14px; border-radius: var(--radius); background: var(--bg-elevated); }
.stack-list dt { color: var(--text); font-weight: 600; }
.stack-list dd { color: var(--text-secondary); }
.check li svg { color: var(--accent); margin-top: 3px; }
.author { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 6px; }
.author .author-avatar { width: 56px; height: 56px; display: grid; place-items: center; font-weight: 700; font-size: 20px; color: #fff; }
.author b { display: block; font-size: 15px; }
.author span { font-size: 13.5px; color: var(--text-secondary); }
.author .row { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; font-size: 13.5px; }
.author .row a { color: var(--accent-2); }

/* ---------- Подвал ---------- */
.footer { border-top: 1px solid var(--border-subtle); padding: 28px 0; font-size: 13px; color: var(--text-muted); }
.footer .wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.footer nav { display: flex; gap: 18px; }
.footer a:hover { color: var(--text-secondary); }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  .features, .links, .steps { grid-template-columns: 1fr 1fr; }
  .stack { flex-direction: column; align-items: center; }
  .stack-card { width: 100%; max-width: 420px; }
  .stack-arrow { transform: rotate(90deg); }
}
@media (max-width: 720px) {
  .nav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 20px 14px;
    background: var(--bg-surface); border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; }
  .nav-toggle { display: grid; place-items: center; }
  .nav-right .btn.hide-sm { display: none; }
  .section { padding: 64px 0; }
  .hero { padding: 64px 0 36px; }
  .features, .links, .steps, .dl-grid, .check, .points { grid-template-columns: 1fr; }
  .nav .wrap { display: flex; justify-content: space-between; }
  .scroll-hint { display: none; }
  .prose section { padding: 22px 18px; }
  .stack-list div { grid-template-columns: 1fr; gap: 4px; }
}
