/* Клич · лендинг — та же система, что в приложении (ui/design/Theme.kt) */
@font-face { font-family: Inter; src: url(fonts/inter_regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url(fonts/inter_medium.ttf); font-weight: 500; font-display: swap; }
@font-face { font-family: Inter; src: url(fonts/inter_semibold.ttf); font-weight: 600; font-display: swap; }
@font-face { font-family: Inter; src: url(fonts/inter_bold.ttf); font-weight: 700; font-display: swap; }
@font-face { font-family: Inter; src: url(fonts/inter_extrabold.ttf); font-weight: 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/mono_regular.ttf); font-weight: 400; font-display: swap; }

:root {
  --bg: #f6f6f3; --surface: #fff; --alt: #ededE9; --ink: #0b0b0c; --ink2: #3a3a3c;
  --muted: #8a8a8e; --faint: #c7c7c4; --line: #e3e3de; --on-ink: #fff;
  --sans: Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, 0, 0, 1);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0a0a0b; --surface: #151517; --alt: #1f1f22; --ink: #f4f4f2; --ink2: #c9c9cc; --faint: #48484b; --line: #262628; --on-ink: #0a0a0b; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--sans); letter-spacing: -0.1px; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; }
h1 { font-size: clamp(40px, 6.2vw, 76px); line-height: 1.02; font-weight: 800; }
h2 { font-size: clamp(30px, 4vw, 48px); line-height: 1.08; font-weight: 800; max-width: 16ch; }
h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .88em; background: var(--alt); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.label { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink2); max-width: 36em; }
.caption { font-size: 14px; color: var(--muted); }
.hidden { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.mark { width: 28px; height: 28px; color: var(--ink); }

/* кнопки */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 26px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-weight: 600; font-size: 16px; transition: transform .15s var(--ease), opacity .2s; }
.btn:hover { opacity: .9; }
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.small { height: 40px; padding: 0 18px; font-size: 14px; }

/* навигация */
.nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; padding: 14px clamp(20px, 5vw, 56px); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: .7px solid transparent; transition: border-color .3s; }
.nav.scrolled { border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -0.03em; }
.nav nav { display: flex; gap: 26px; margin-left: auto; font-size: 15px; color: var(--ink2); }
.nav nav a:hover { color: var(--ink); }

main { padding: 0 clamp(20px, 5vw, 56px); max-width: 1240px; margin: 0 auto; }

/* первый экран */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 6vw, 80px); align-items: center; min-height: calc(100vh - 70px); padding: 40px 0 80px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 12px; border-radius: 999px; background: var(--surface); border: .7px solid var(--line); font-size: 13px; font-weight: 500; color: var(--ink2); margin-bottom: 26px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); position: relative; }
.dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: var(--ink); opacity: .25; animation: pulse 1.8s infinite; }
@keyframes pulse { from { transform: scale(.4); opacity: .4; } to { transform: scale(1.8); opacity: 0; } }
.hero .lead { margin: 26px 0 34px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.fine { margin-top: 16px; font-size: 14px; color: var(--muted); }

/* телефон */
.phone { justify-self: center; width: min(340px, 82vw); aspect-ratio: 9 / 18.5; border-radius: 48px; padding: 12px; background: var(--ink); box-shadow: 0 40px 80px -30px rgba(0,0,0,.35); }
.screen { height: 100%; border-radius: 38px; background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }
.ph-bar { display: flex; align-items: center; gap: 10px; padding: 34px 16px 12px; }
.ph-bar b { display: block; font-size: 15px; }
.ph-bar small { font-size: 11px; color: var(--muted); }
.ph-av { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; font-weight: 600; font-size: 14px; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--faint); }
.ph-lock { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; transition: background .2s; }
.ph-lock svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ph-lock.on { background: var(--ink); color: var(--on-ink); }
.ph-msgs { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; padding: 12px; font-size: 14px; line-height: 1.38; }
.ph-day { align-self: center; font-size: 11px; color: var(--muted); background: var(--surface); padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; }
.ph-msgs p { max-width: 82%; padding: 8px 12px; border-radius: 18px; margin-top: 6px; white-space: pre-wrap; word-break: break-word; }
.ph-msgs p.join { margin-top: 0; }
.ph-msgs .in { align-self: flex-start; background: var(--surface); }
.ph-msgs .in.join { border-top-left-radius: 6px; }
.ph-msgs .out { align-self: flex-end; background: var(--ink); color: var(--on-ink); }
.ph-msgs .out.join { border-top-right-radius: 6px; }
.ph-msgs p.mono, .cipher-text.mono { font-family: var(--mono); font-size: .86em; }
.ph-input { display: flex; align-items: center; gap: 8px; padding: 10px 12px 22px; }
.ph-input span { flex: 1; height: 40px; border-radius: 20px; background: var(--surface); color: var(--muted); font-size: 13px; padding: 10px 14px; }
.ph-input i { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); }

/* блоки */
.block { padding: clamp(72px, 10vw, 128px) 0; border-top: .7px solid var(--line); }
.block > h2 { margin-bottom: 48px; }
.paths, .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.paths article, .grid > div { background: var(--surface); border-radius: 24px; padding: 28px; }
.paths p, .grid p { color: var(--ink2); margin-top: 10px; font-size: 16px; }
.path-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--alt); display: grid; place-items: center; margin-bottom: 22px; }
.path-ic svg { width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.relay { display: flex; align-items: center; margin: 48px auto 18px; max-width: 760px; }
.relay .node { flex: none; padding: 10px 16px; border-radius: 999px; background: var(--surface); border: .7px solid var(--line); font-size: 14px; font-weight: 500; }
.relay .node.you, .relay .node.friend { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.relay .wire { flex: 1; height: 2px; background: var(--line); position: relative; overflow: hidden; }
.relay .wire i { position: absolute; top: -2px; width: 22px; height: 6px; border-radius: 3px; background: var(--ink); animation: travel 2.4s var(--ease) infinite; }
.relay .wire:nth-of-type(4) i { animation-delay: .8s; }
.relay .wire:nth-of-type(6) i { animation-delay: 1.6s; }
@keyframes travel { from { left: -22px; } to { left: 100%; } }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.split h2 { margin-bottom: 32px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.checks li { padding-left: 34px; position: relative; color: var(--ink2); }
.checks li b { color: var(--ink); }
.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); }
.checks li::after { content: ""; position: absolute; left: 6px; top: 8px; width: 8px; height: 5px; border-left: 2px solid var(--on-ink); border-bottom: 2px solid var(--on-ink); transform: rotate(-45deg); }

.cipher-card { background: var(--surface); border-radius: 28px; padding: 28px; }
.cipher-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--muted); }
.toggle { width: 52px; height: 30px; border-radius: 15px; border: 0; background: var(--alt); position: relative; cursor: pointer; transition: background .25s; flex: none; }
.toggle span { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .25s var(--ease); }
.toggle[aria-pressed="true"] { background: var(--ink); }
.toggle[aria-pressed="true"] span { transform: translateX(22px); background: var(--on-ink); }
.cipher-text { margin: 26px 0; min-height: 3.2em; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; word-break: break-all; }
.code { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 0; font-family: var(--mono); font-size: 18px; padding: 18px 20px; border-radius: 18px; background: var(--alt); margin-bottom: 12px; }

.download { text-align: center; }
.download h2 { margin: 18px auto 12px; }
.mark.big { width: 72px; height: 72px; }
.mark.big .arc { animation: sing 1.8s infinite; }
.mark.big .a2 { animation-delay: .3s; }
.mark.big .a3 { animation-delay: .6s; }
@keyframes sing { 0%, 100% { opacity: 1; } 55% { opacity: .15; } }
.dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 900px; margin: 44px auto 28px; text-align: left; }
.dl-card { display: flex; flex-direction: column; gap: 4px; padding: 26px; border-radius: 24px; background: var(--surface); transition: transform .2s var(--ease); }
.dl-card:hover { transform: translateY(-3px); }
.dl-card .os { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dl-card b { font-size: 20px; letter-spacing: -0.02em; margin-top: 18px; }
.dl-card small { color: var(--muted); font-size: 14px; }
.dl-card.primary { background: var(--ink); color: var(--on-ink); }
.dl-card.primary .os, .dl-card.primary small { color: color-mix(in srgb, var(--on-ink) 60%, transparent); }
.dl-card.disabled { opacity: .45; pointer-events: none; }
.howto { max-width: 560px; margin: 0 auto 20px; text-align: left; background: var(--surface); border-radius: 20px; padding: 6px 22px; }
.howto summary, .faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; }
.howto summary::after, .faq summary::after { content: "+"; font-weight: 400; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .2s; }
details[open] > summary::after { transform: rotate(45deg); }
.howto ol { margin: 0 0 14px; padding-left: 20px; color: var(--ink2); }
.howto li { margin: 6px 0; }
.copy { border: 0; background: none; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }

.faq details { border-bottom: .7px solid var(--line); max-width: 760px; }
.faq summary { font-size: 19px; padding: 22px 0; }
.faq details p { color: var(--ink2); padding: 0 0 22px; max-width: 46em; }

footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 36px clamp(20px, 5vw, 56px); border-top: .7px solid var(--line); }

/* появление при прокрутке */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 24px; }
  .phone { width: min(300px, 78vw); }
  .paths, .grid, .dl, .split { grid-template-columns: 1fr; }
  .nav nav { display: none; }
  .nav .btn { margin-left: auto; }
  .relay .node { padding: 8px 10px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* кнопка, файла для которой ещё нет */
.soon { opacity: .4; pointer-events: none; }
