@font-face { font-family: "VT323"; src: url("/assets/fonts/vt323-latin.woff2") format("woff2"); font-display: swap; unicode-range: U+0000-00FF; }
:root {
  color-scheme: light;
  --nav-bg: rgba(255, 255, 255, .78);
  --text-body: #2c2c30;
  --th: #f5f5f7;
  --tint: rgba(0, 113, 227, .1);
  --bg: #fbfbfd;
  --surface: #fff;
  --text: #1d1d1f;
  --text-2: #57575c;
  --text-3: #86868b;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --line: rgba(0, 0, 0, .1);
  --r-l: 22px;
  --r-s: 12px;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", InterVariable, Inter, system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", InterVariable, Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { font: 17px/1.5 var(--font); letter-spacing: -.012em; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
:focus-visible { outline: 3px solid rgba(0, 113, 227, .45); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; text-wrap: balance; }
h2 { font-size: clamp(34px, 4.4vw, 48px); line-height: 1.08; letter-spacing: -.035em; }
.h3 { font-size: 21px; letter-spacing: -.02em; line-height: 1.2; }
.muted { color: var(--text-2); font-size: 15px; }

/* навигация: единственный стеклянный элемент сайта, как панель в Safari */
.nav-wrap { position: sticky; top: 0; z-index: 100; background: var(--nav-bg); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border-bottom: 1px solid var(--line); transition: box-shadow .3s; }
.nav-wrap.scrolled { box-shadow: 0 6px 24px -12px rgba(0, 0, 0, .18); }
.theme-toggle { width: 36px; height: 36px; border-radius: 18px; display: grid; place-items: center; color: var(--text-2); background: transparent; border: 0; cursor: pointer; transition: background .2s, color .2s; flex: none; }
.theme-toggle:hover { background: var(--tint); color: var(--text); }
.theme-toggle .moon, html.theme-dark .theme-toggle .sun { display: none; }
html.theme-dark .theme-toggle .moon { display: block; }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.nav { max-width: 1040px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 8px; }
/* знак «apkin.»: пиксельный VT323, точка фирменным синим */
.wm { font-family: "VT323", ui-monospace, monospace; font-weight: 400; font-size: 32px; line-height: 1; letter-spacing: 0; color: var(--text); transform: translateY(-1px); }
.wm i { font-style: normal; color: var(--blue); }
.wm-sm { font-size: 22px; margin-right: 6px; transform: none; }
.brand img { image-rendering: auto; }
.nav-links { flex: 1; display: flex; gap: 28px; font-size: 14px; color: var(--text-2); }
.nav-links a:hover { color: var(--text); }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 24px; border-radius: 24px; background: var(--blue); color: #fff; font-weight: 600; font-size: 17px; letter-spacing: -.02em; white-space: nowrap; transition: background .2s, transform .15s var(--ease); }
.btn:hover { background: var(--blue-hover); }
.btn .tg { margin: 0 8px 0 -4px; flex: none; }
.btn.secondary { background: var(--tint); color: var(--blue); }
.btn.secondary:hover { background: rgba(0, 113, 227, .16); }
.btn:active { transform: scale(.97); }
.btn-sm { height: 34px; padding: 0 16px; font-size: 14px; border-radius: 17px; }
.link { color: var(--blue); font-size: 17px; }
.link::after { content: " ›"; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* первый экран */
.hero { max-width: 1040px; margin: 0 auto; padding: 72px 24px 0; display: grid; grid-template-columns: 1fr 340px; gap: 64px; align-items: end; }
.hero-copy { padding-bottom: 120px; }
h1 { font-size: clamp(40px, 5.6vw, 64px); line-height: 1.03; letter-spacing: -.045em; max-width: 13ch; }
.lead { margin-top: 20px; max-width: 34em; font-size: 19px; line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.ctas { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 32px; }
.hero-visual { position: relative; align-self: end; }
.hero-mascot { position: absolute; left: -134px; bottom: 40px; width: 150px; height: auto; }
.step-mascot { display: block; width: 96px; height: auto; margin: 0 0 14px -6px; }
.faq-mascot { display: block; width: 160px; height: auto; margin-top: 28px; }
.safe-mascot { display: block; width: 72px; height: auto; margin-bottom: 18px; }
.final-mascot { width: 112px; height: auto; flex: none; }
.final-ctas { margin-top: 0; }
.final-inner p { flex: 1; min-width: 240px; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; }
.hero-shot { align-self: end; height: 600px; overflow: hidden; -webkit-mask: linear-gradient(#000 80%, transparent); mask: linear-gradient(#000 80%, transparent); }
.hero-shot img { width: 340px; filter: drop-shadow(0 24px 32px rgba(0, 0, 0, .16)); }

/* каталог */
.apps-strip { border-top: 1px solid var(--line); background: var(--surface); padding: 40px 0 36px; }
.apps { display: flex; flex-wrap: wrap; gap: 24px 28px; margin: 22px 0 0; }
.apps-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.apps-foot p { font-size: 14px; color: var(--text-3); }
.apps li { width: 76px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 13px; font-weight: 500; line-height: 1.25; color: var(--text); }
.apps img { width: 64px; height: 64px; border-radius: 22.37%; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .1); }

/* шаги */
.how { padding: 112px 0 40px; }
.steps { margin-top: 56px; counter-reset: s; }
.step { display: grid; grid-template-columns: 1fr 300px; gap: 64px; align-items: center; padding: 48px 0; border-top: 1px solid var(--line); }
.step:nth-child(even) { grid-template-columns: 300px 1fr; }
.step:nth-child(even) .step-text { order: 2; }
.step-text { max-width: 30em; }
.step-mark { position: relative; width: 96px; margin: 0 0 18px -6px; }
.step-mark .step-mascot { margin: 0; }
.step-n { position: absolute; right: -6px; bottom: 2px; width: 32px; height: 32px; border-radius: 16px; display: grid; place-items: center; background: var(--blue); color: #fff; font: 700 17px/1 var(--display); box-shadow: 0 0 0 3px var(--bg); }
.step h3 { font-size: 24px; line-height: 1.2; letter-spacing: -.025em; }
.step p { margin-top: 12px; color: var(--text-2); font-size: 18px; text-wrap: pretty; }
.step-shot { height: 420px; overflow: hidden; -webkit-mask: linear-gradient(#000 75%, transparent); mask: linear-gradient(#000 75%, transparent); }
.step-shot img { width: 300px; }
.step-shot.bottom { display: flex; flex-direction: column; justify-content: flex-end; -webkit-mask: linear-gradient(transparent, #000 25%); mask: linear-gradient(transparent, #000 25%); }
.step-shot.bottom img { flex: none; }

/* безопасность */
.dark { background: #000; color: #f5f5f7; }
.dark-inner { display: grid; grid-template-columns: 1fr 420px; gap: 72px; align-items: center; padding-top: 104px; padding-bottom: 104px; }
.dark .sub { margin-top: 18px; color: #a1a1a6; font-size: 19px; line-height: 1.5; max-width: 30em; }
.settings { background: #1c1c1e; border-radius: var(--r-l); overflow: hidden; }
.srow { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 18px; position: relative; font-size: 17px; }
.srow + .srow::before { content: ""; position: absolute; top: 0; left: 64px; right: 0; height: 1px; background: rgba(255, 255, 255, .1); }
.sicon { width: 30px; height: 30px; border-radius: 7px; background: var(--c); display: grid; place-items: center; flex: none; }
.sicon svg { width: 19px; height: 19px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.st { flex: 1; }
.sv { color: #98989d; font-size: 15px; }
.sv.accent { color: #64d2ff; }
.settings-foot { font-size: 13px; color: #8e8e93; padding: 12px 18px 14px; border-top: 1px solid rgba(255, 255, 255, .1); }

/* вопросы */
.faq-wrap { padding: 112px 0 40px; }
.faq-grid { display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: start; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 26px; line-height: 1; color: var(--text-3); transition: rotate .3s var(--ease); }
.faq details[open] summary::after { rotate: 45deg; }
.faq p { padding: 0 48px 22px 0; color: var(--text-2); }

.final { padding: 80px 0 96px; }
.final-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 40px; border-top: 1px solid var(--line); }
.final p { font: 600 24px/1.3 var(--display); letter-spacing: -.025em; max-width: 26em; }

.footer { padding: 24px 0 40px; font-size: 13px; color: var(--text-3); background: var(--surface); border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 22px; }
.footer a:hover { color: var(--text); }
.disclaimer { margin-top: 10px; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav { justify-content: space-between; }
  .hero { grid-template-columns: 1fr; gap: 64px; padding-top: 56px; }
  .ctas { flex-direction: column; align-items: stretch; }
  .ctas .btn { width: 100%; }
  .hero-copy { padding-bottom: 0; }
  .hero-visual { justify-self: center; }
  .hero-shot { height: 420px; }
  .hero-mascot { left: -36px; bottom: 12px; width: 96px; }
  .faq-mascot { display: none; }
  .hero-shot img { width: 280px; }
  .step, .step:nth-child(even) { grid-template-columns: 1fr; gap: 28px; padding: 40px 0 0; }
  .step h3 { font-size: 21px; }
  .step p { font-size: 17px; }
  .step:nth-child(even) .step-text { order: 0; }
  .step-shot { height: 340px; justify-self: center; }
  .step-shot img { width: 260px; }
  .dark-inner { grid-template-columns: 1fr; gap: 40px; padding-top: 80px; padding-bottom: 80px; }
  .faq-grid { grid-template-columns: 1fr; gap: 16px; }
  .how, .faq-wrap { padding-top: 80px; }
  .apps { gap: 18px 14px; }
  .apps li { width: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav-wrap { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* тёмная тема: класс ставит theme.js (выбор пользователя или настройка системы) */
html.theme-dark { color-scheme: dark;
    --bg: #000; --surface: #111113; --text: #f5f5f7; --text-2: #a1a1a6; --text-3: #86868b;
    --blue: #2997ff; --blue-hover: #47a6ff; --line: rgba(255, 255, 255, .12);
    --nav-bg: rgba(0, 0, 0, .72); --text-body: #d1d1d6; --th: #1c1c1e; --tint: rgba(41, 151, 255, .16);
  }
html.theme-dark .btn { background: #0071e3; }
html.theme-dark .btn:hover { background: #0077ed; }
html.theme-dark .btn.secondary { background: var(--tint); color: var(--blue); }
html.theme-dark .dark { background: #0b0b0d; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
html.theme-dark .apps img { box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .12); }
html.theme-dark .nav-wrap.scrolled { box-shadow: 0 6px 24px -12px rgba(0, 0, 0, .8); }
html.theme-dark .hero-shot img, html.theme-dark .step-shot img { filter: none; }

/* обещания безопасности */
.trust { margin-top: 28px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: var(--text-2); }
.trust li { display: flex; align-items: center; gap: 8px; }
.trust svg, .safe-list svg { color: #34c759; flex: none; }
.safe-list { margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.safe-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 17px; line-height: 1.45; color: #d1d1d6; }
.safe-list svg { margin-top: 3px; }
.dark .sub { color: #e5e5ea; }
@media (max-width: 860px) { .trust { margin-top: 24px; } }

/* анимированные Апки (design/mascot/site_anim.py): в кадре запас под прыжки и искры — визуально подгоняем к прежнему размеру */
.mascot-anim { transform: scale(1.25); }

/* подпись под кнопками, кнопки каталога, «что входит в покупку» */
.apps-actions { display: flex; gap: 24px; flex-wrap: wrap; }
.apps-actions .link { font-size: 15px; }
.incl { padding: 112px 0 0; }
.incl-grid { display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: start; }
.incl-list { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; }
.incl-list li { display: flex; flex-direction: column; gap: 4px; padding-top: 16px; border-top: 1px solid var(--line); }
.incl-list b { font-size: 18px; letter-spacing: -.02em; }
.incl-list span { color: var(--text-2); font-size: 16px; line-height: 1.5; }
.foot-support { color: var(--text-2); }
@media (max-width: 860px) {
  .incl { padding-top: 80px; }
  .incl-grid { grid-template-columns: 1fr; gap: 24px; }
  .incl-list { grid-template-columns: 1fr; gap: 20px; }
}

