/* Лендинг TrackBuilder. Цвета — как в программе (окно обновления, src/desktop/update.html):
   тёмный фон, оранжевый акцент; шрифт — системный (как в программе: Segoe UI на Windows). */
:root {
  --bg: #0b1016;
  --bg-2: #0f1620;
  --panel: #141c25;
  --line: #273341;
  --text: #e8edf2;
  --muted: #8d9aa8;
  --brand: #f97316;
  --brand-hi: #fb8a3c;
  --copper: #d08a5a;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hi); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); }
h3 { font-size: 1.08rem; }

/* ---------- шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 16, 22, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 1.2rem; font-weight: 600; letter-spacing: .02em; }
.brand:hover { color: var(--text); }
.brand img { border-radius: 9px; }
.brand b { color: var(--copper); font-weight: 600; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); font-size: .95rem; }
.nav a:hover { color: var(--text); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: .85rem; font-weight: 600; }
.lang a, .lang span { padding: 5px 10px; color: var(--muted); }
.lang a:hover { color: var(--text); background: #1f2934; }
.lang .on { color: var(--text); background: #1f2934; box-shadow: inset 0 -2px 0 var(--brand); }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 10px; font-weight: 600;
  border: 1px solid var(--line); color: var(--text); background: #1f2934;
  transition: background .15s, border-color .15s;
}
.btn:hover { color: var(--text); border-color: var(--muted); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #111; }
.btn-primary:hover { background: var(--brand-hi); border-color: var(--brand-hi); color: #111; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 8px 16px; font-size: .92rem; }
.btn:focus-visible, .tab:focus-visible, .shot:focus-visible, summary:focus-visible, .lb-close:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 3px;
}

/* ---------- первый экран ---------- */
.hero {
  padding: 64px 0 40px;
  background:
    radial-gradient(900px 480px at 85% 10%, rgba(249, 115, 22, .14), transparent 70%),
    radial-gradient(700px 420px at 0% 100%, rgba(40, 80, 140, .22), transparent 70%);
}
.hero-in { display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--copper); text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 600; margin: 0 0 12px; }
.lead { color: #c4ced8; font-size: 1.12rem; margin: 0 0 28px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.cta.center { justify-content: center; margin-top: 32px; }
.meta { color: var(--muted); font-size: .9rem; margin: 18px 0 0; }
.hero-shot { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }

/* ---------- разделы ---------- */
.section { padding: 80px 0; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-lead { color: var(--muted); font-size: 1.05rem; margin: 0 0 36px; max-width: 720px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card p { color: #b3bfcb; font-size: .95rem; margin: 0; }
.ic {
  width: 40px; height: 40px; border-radius: 10px; margin-bottom: 14px;
  display: grid; place-items: center; font-size: 1.25rem;
  color: var(--brand); background: rgba(249, 115, 22, .12); border: 1px solid rgba(249, 115, 22, .3);
}

.evolve {
  margin: 24px 0 0; padding: 18px 22px; border-radius: var(--radius);
  background: rgba(249, 115, 22, .08); border: 1px solid rgba(249, 115, 22, .3); color: #c4ced8;
}
.evolve b { color: var(--text); }

/* ---------- галерея ---------- */
.tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 20px; }
.tab { font: inherit; color: var(--muted); background: var(--panel); border: 0; padding: 9px 22px; cursor: pointer; }
.tab + .tab { border-left: 1px solid var(--line); }
.tab.on { color: var(--text); background: #1f2934; box-shadow: inset 0 -2px 0 var(--brand); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid[hidden], .tabs[hidden] { display: none; }
.shot { position: relative; display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.shot img { width: 100%; transition: transform .35s; }
.shot:hover img { transform: scale(1.03); }
.shot span {
  position: absolute; left: 12px; bottom: 12px;
  background: rgba(11, 16, 22, .82); color: var(--text);
  font-size: .85rem; padding: 4px 10px; border-radius: 999px;
}
.shot-wide { margin-top: 16px; }

/* ---------- как начать ---------- */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { counter-increment: s; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 22px 64px; position: relative; color: #b3bfcb; }
.steps li::before {
  content: counter(s); position: absolute; left: 20px; top: 20px;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #111; font-weight: 700;
}
.steps b { color: var(--text); display: block; margin-bottom: 4px; }

/* ---------- вопросы ---------- */
details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
summary { cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none; position: relative; padding-right: 48px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 20px; top: 12px; font-size: 1.4rem; color: var(--brand); }
details[open] summary::after { content: '−'; }
details p { margin: 0; padding: 0 20px 18px; color: #b3bfcb; }

/* ---------- контакты ---------- */
.contact { display: grid; grid-template-columns: 340px 1fr; gap: 48px; align-items: center; }
.logo { border-radius: var(--radius); border: 1px solid var(--line); }
.contacts { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.contacts li { display: flex; gap: 16px; align-items: baseline; font-size: 1.1rem; }
.contacts span { color: var(--muted); font-size: .9rem; min-width: 80px; }

.foot { border-top: 1px solid var(--line); padding: 26px 0; color: var(--muted); font-size: .9rem; }
.foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- просмотр картинки ---------- */
.lightbox { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 94vh; overflow: visible; }
.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.lightbox img { max-width: 96vw; max-height: 86vh; border-radius: 10px; }
.lb-cap { text-align: center; color: var(--text); margin: 10px 0 0; }
.lb-close {
  position: absolute; top: -14px; right: -14px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 1.5rem; line-height: 1; cursor: pointer;
}

/* ---------- узкие экраны ---------- */
@media (max-width: 980px) {
  .hero-in { grid-template-columns: 1fr; gap: 32px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .contact .logo { max-width: 280px; }
}
@media (max-width: 640px) {
  .nav { display: none; }
  .top-in { justify-content: space-between; gap: 10px; }
  .lang { margin-left: auto; }
  .hero { padding-top: 36px; }
  .section { padding: 56px 0; }
  .cards, .grid { grid-template-columns: 1fr; }
  .wrap { padding: 0 16px; }
  .lb-close { top: 8px; right: 8px; }
}
@media (max-width: 430px) {
  .brand span { display: none; } /* в шапке остаются значок, RU / EN и «Скачать» */
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shot img { transition: none; }
}
