/* Тема «Сумерки» — токены как в приложении (zivy/src/renderer/src/styles.css) */
:root {
  --bg: #1b2232;
  --side: #161c29;
  --fg: #e8ecf3;
  --mut: #9aa4b6;
  --line: #2a3344;
  --chip: #273142;
  --acc: #ef5350;
  --ok: #5fd39a;
  /* белый на #ef5350 — 3,9:1, мало для текста 16px; фон кнопки темнее (4,7:1), акцентные ссылки светлее (7:1 к фону) */
  --acc-btn: #d63a37;
  --acc-btn-hover: #c7302d;
  --acc-text: #ff8a87;
  --radius: 14px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--acc-text); text-underline-offset: 3px; }
a:hover { color: #ffb0ae; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
b { font-weight: 650; }
:focus-visible { outline: 3px solid #8fb3ff; outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(820px, 100% - 32px); }

.skip { position: absolute; left: 16px; top: -60px; background: var(--fg); color: var(--bg); padding: 10px 14px; border-radius: 8px; z-index: 100; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 20; background: #1b2232d9; backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; font-weight: 800; font-size: 20px; color: var(--fg); text-decoration: none; letter-spacing: -.01em; }
.brand:hover { color: var(--fg); }
.brand img { width: 34px; height: 34px; margin-right: 10px; }
.brand i { color: var(--acc); font-style: normal; }
.brand.small { font-size: 16px; }
.brand.small img { width: 24px; height: 24px; margin-right: 8px; }
.menu { display: flex; align-items: center; gap: 6px; }
.menu a { color: var(--mut); text-decoration: none; font-size: 15px; padding: 8px 12px; border-radius: 9px; }
.menu a:hover { color: var(--fg); background: var(--chip); }
.menu a.menu-cta { color: var(--fg); background: var(--chip); border: 1px solid var(--line); font-weight: 600; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 22px;
  border-radius: 12px; font-weight: 700; font-size: 16px; text-decoration: none; color: var(--fg);
  background: var(--chip); border: 1px solid var(--line); transition: transform .15s, background .15s, box-shadow .15s;
}
.btn:hover { color: var(--fg); background: #2f3a4e; transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.primary { background: var(--acc-btn); border-color: var(--acc-btn); color: #fff; box-shadow: 0 10px 30px #ef535044; }
.btn.primary:hover { background: var(--acc-btn-hover); color: #fff; box-shadow: 0 14px 36px #ef535066; }
.btn small { font-weight: 500; opacity: .85; font-size: 13px; }
.btn.primary small { opacity: 1; }
.btn.wide { width: 100%; justify-content: space-between; }

/* Первый экран: стена постеров */
.hero { position: relative; padding: 72px 0 96px; overflow: hidden; isolation: isolate; text-align: center; }
.wall { position: absolute; inset: -140px -100px; z-index: -2; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 16px; transform: rotate(-8deg); opacity: .5; }
.wall img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; }
.shade { position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 60% 70% at 50% 48%, #1b2232f5 30%, #1b2232c4 62%, #1b223266),
              linear-gradient(#1b2232 0, transparent 16%, transparent 78%, #1b2232 100%); }
.hero-in { display: flex; flex-direction: column; align-items: center; }
.hero-icon { width: 96px; height: 96px; margin-bottom: 22px; filter: drop-shadow(0 16px 40px #ef535077); }
.badge { display: inline-flex; align-items: center; gap: 8px; background: #ef53501f; color: var(--acc-text); border: 1px solid #ef535055; border-radius: 20px; padding: 4px 12px; font-size: 13px; font-weight: 650; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); }
.hero h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 800; margin: 18px 0 18px; max-width: 900px; }
.hero h1 em { font-style: normal; color: var(--acc); display: block; }
.lead { font-size: clamp(17px, 1.7vw, 20px); color: #b8c0ce; max-width: 660px; }
.btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.note { margin-top: 14px; font-size: 14px; color: var(--mut); }
.pills { list-style: none; padding: 0; margin: 52px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.pills li { background: #161c29cc; border: 1px solid var(--line); border-radius: 14px; padding: 14px 22px; text-align: left; font-size: 14px; color: var(--mut); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); min-width: 200px; }
.pills b { display: block; color: var(--fg); font-size: 18px; }
.pills li:first-child { border-color: #ef535066; background: #2a1f2bcc; }

/* Как скачать */
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.steps li { background: var(--side); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--acc-btn); color: #fff; font-weight: 800; font-size: 18px; }
.steps h3 { font-size: 19px; margin: 16px 0 8px; }
.steps p { color: var(--mut); font-size: 15px; }

/* Одна программа вместо трёх */
.trio { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; margin-top: 40px; }
.trio > div { background: var(--side); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.trio .trio-main { background: linear-gradient(150deg, #ef535026, var(--side) 65%); border-color: #ef535055; }
.trio svg { width: 40px; height: 40px; padding: 9px; border-radius: 11px; background: #ef53501f; color: var(--acc-text); }
.trio h3 { font-size: 21px; margin: 16px 0 8px; }
.trio .trio-main h3 { font-size: 26px; }
.trio p { color: var(--mut); font-size: 15px; }
.trio .trio-main p { color: #c9d0dc; font-size: 16px; }
.tag { display: inline-block; vertical-align: middle; margin-left: 6px; font-size: 12px; font-weight: 650; letter-spacing: 0; color: var(--bg); background: var(--ok); border-radius: 6px; padding: 1px 7px; }
.card.soon { border-style: dashed; }

/* Секции */
.sec { padding: 88px 0; border-top: 1px solid var(--line); }
.sec h2 { font-size: clamp(30px, 3.6vw, 42px); font-weight: 800; }
.sub { color: var(--mut); font-size: 18px; margin-top: 10px; }

.cards { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--side); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card svg { width: 40px; height: 40px; padding: 9px; border-radius: 11px; background: #ef53501f; color: var(--acc-text); }
.card h3 { font-size: 19px; margin: 16px 0 8px; }
.card p { color: var(--mut); font-size: 15px; }

/* Скриншоты */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 32px 0 20px; background: var(--side); border: 1px solid var(--line); padding: 4px; border-radius: 12px; width: fit-content; max-width: 100%; }
.tabs button { font: inherit; font-size: 15px; color: var(--mut); background: none; border: 0; padding: 8px 16px; border-radius: 9px; cursor: pointer; }
.tabs button:hover { color: var(--fg); }
.tabs button[aria-selected="true"] { background: var(--chip); color: var(--fg); font-weight: 650; }
.shot-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius); }
.shot-open img { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 30px 80px #0008; aspect-ratio: 16 / 10; }
.shot-cap { color: var(--mut); margin-top: 14px; font-size: 15px; text-align: center; }

.zoom { padding: 0; border: 0; background: none; max-width: 96vw; max-height: 96vh; overflow: visible; }
.zoom::backdrop { background: #0b0e16e6; }
.zoom img { max-width: 96vw; max-height: 92vh; width: auto; border-radius: 10px; }
.zoom-close { position: absolute; top: -14px; right: -14px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--chip); color: var(--fg); font-size: 24px; line-height: 1; cursor: pointer; }

/* Скачать */
.dl { background: linear-gradient(180deg, var(--side), var(--bg)); }
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.dl-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.dl-card .os { width: 36px; height: 36px; color: var(--fg); }
.dl-card h3 { font-size: 24px; }
.dl-card > p { color: var(--mut); }
.dl-card .hint { font-size: 14px; margin-top: 4px; }

/* Вопросы */
details { border: 1px solid var(--line); border-radius: 12px; background: var(--side); margin-top: 12px; }
details:first-of-type { margin-top: 32px; }
summary { cursor: pointer; padding: 18px 52px 18px 20px; font-weight: 650; font-size: 17px; list-style: none; position: relative; border-radius: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--mut); border-bottom: 2px solid var(--mut); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details > div { padding: 0 20px 20px; color: #c9d0dc; }
details p + p, details ol + p, details p + ol, details p + pre, details pre + p { margin-top: 12px; }
details ol { margin: 12px 0 0; padding-left: 22px; }
details li + li { margin-top: 6px; }
pre { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; font-size: 14px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--fg); }

/* Бета */
.beta { padding: 0 0 88px; }
.beta-in { display: flex; align-items: center; gap: 24px; background: linear-gradient(120deg, #ef535022, #273142 60%); border: 1px solid #ef535044; border-radius: 18px; padding: 28px 32px; }
.beta-in > svg { width: 48px; height: 48px; flex: none; color: var(--acc-text); }
.beta-in > div { flex: 1; }
.beta h2 { font-size: 22px; margin-bottom: 6px; }
.beta p { color: #c9d0dc; }

.foot { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--mut); font-size: 14px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.foot-in p:nth-child(2) { flex: 1; min-width: 240px; }

.sprite { position: absolute; }
.nf { min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 18px; }
.nf h1 { font-size: 40px; }

/* Планшет и телефон */
@media (max-width: 900px) {
  .hero { padding: 40px 0 64px; }
  .wall { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .trio, .steps { grid-template-columns: minmax(0, 1fr); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl-grid { grid-template-columns: minmax(0, 1fr); }
  .sec { padding: 64px 0; }
}
@media (max-width: 640px) {
  .menu a:not(.menu-cta) { display: none; }
  .btns .btn { width: 100%; }
  .hero-icon { width: 72px; height: 72px; }
  .wall { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .pills { flex-direction: column; width: 100%; margin-top: 36px; gap: 10px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .beta-in { flex-direction: column; align-items: flex-start; padding: 24px; }
  .beta-in .btn { width: 100%; }
  .tabs { width: 100%; flex-wrap: nowrap; overflow-x: auto; }
  .tabs button { flex: none; padding: 8px 12px; }
  .btn.wide { flex-wrap: wrap; }
  summary { font-size: 16px; }
}
