/* Hopkey — сайт продукта. Тёплая «клавиша» из иконки: кремовый фон, янтарный акцент. */

:root {
  --bg: #f7f2e8;
  --bg-2: #efe7d7;
  --card: #fffdf8;
  --card-2: #f9f4ea;
  --fg: #1e1a14;
  --dim: #4a443a;
  --muted: #6e665a;
  --faint: #9a9182;
  --line: rgba(30, 26, 20, .10);
  --line-2: rgba(30, 26, 20, .16);
  --accent: #f5a623;
  --accent-2: #ffc35c;
  --accent-ink: #9a5b00;
  --accent-soft: rgba(245, 166, 35, .16);
  --on-accent: #1e1a14;
  --ok: #2f9e5b;
  --rec: #e5484d;
  --blue: #3b7ddd;
  --violet: #7b61d9;
  --teal: #13968a;
  --rose: #d2537a;
  --glass: rgba(255, 253, 248, .82);
  --glass-line: rgba(30, 26, 20, .12);
  --shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 24px 60px -18px rgba(70, 48, 10, .28), 0 4px 14px -6px rgba(70, 48, 10, .18);
  --key-top: #fffaf0;
  --key-side: #e6dcc9;
  --desk-a: #e9dcc4;
  --desk-b: #d9c6a4;
  --radius: 18px;
  --wrap: 1160px;
  --sans: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #13110d;
  --bg-2: #1a1712;
  --card: #201c16;
  --card-2: #1b1813;
  --fg: #f4ede1;
  --dim: #d6ccbb;
  --muted: #ada290;
  --faint: #7c7364;
  --line: rgba(244, 237, 225, .09);
  --line-2: rgba(244, 237, 225, .15);
  --accent: #ffb547;
  --accent-2: #ffcf7a;
  --accent-ink: #ffc46b;
  --accent-soft: rgba(255, 181, 71, .14);
  --on-accent: #1e1a14;
  --ok: #4cc27f;
  --rec: #ff6b6f;
  --blue: #6aa2ff;
  --violet: #a58ff5;
  --teal: #3cc4b5;
  --rose: #f07ca0;
  --glass: rgba(36, 32, 26, .86);
  --glass-line: rgba(244, 237, 225, .12);
  --shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 30px 70px -20px rgba(0, 0, 0, .7), 0 4px 14px -6px rgba(0, 0, 0, .5);
  --key-top: #2b261f;
  --key-side: #0d0b08;
  --desk-a: #2a2219;
  --desk-b: #1a140e;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: inherit; }
b, strong { font-weight: 600; }
code, .mono { font-family: var(--mono); }
code { white-space: nowrap; font-size: .88em; padding: .1em .38em; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ── keycap: общий элемент страницы ─────────────────────────────── */
.kc {
  display: inline-grid; place-items: center;
  min-width: 1.75em; height: 1.75em; padding: 0 .45em;
  font: 500 .78em/1 var(--mono);
  color: var(--dim);
  background: var(--key-top);
  border: 1px solid var(--line-2);
  border-bottom-width: 2.5px;
  border-radius: 7px;
  vertical-align: .08em;
  white-space: nowrap;
}
.kc.acc { background: var(--accent); color: var(--on-accent); border-color: color-mix(in srgb, var(--accent) 60%, #000); }

/* ── шапка ──────────────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.top-nav { display: flex; gap: 22px; font-size: 15px; color: var(--muted); }
.top-nav a { text-decoration: none; transition: color .15s; white-space: nowrap; }
.top-nav a:hover { color: var(--fg); }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--muted);
  cursor: pointer; transition: color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--fg); border-color: var(--line-2); }
.icon-btn svg { width: 17px; height: 17px; }
.lang { display: flex; font: 500 13px/1 var(--mono); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.lang a { padding: 10px 10px; text-decoration: none; color: var(--faint); }
.lang a[aria-current] { color: var(--fg); background: var(--accent-soft); }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 20px; border-radius: 13px;
  font: 600 16px/1 var(--sans); text-decoration: none; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--card); color: var(--fg);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn.pri {
  background: var(--accent); color: var(--on-accent);
  border-color: color-mix(in srgb, var(--accent) 70%, #000);
  border-bottom-width: 3px;
  box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--accent) 80%, transparent);
}
.btn.pri:active { transform: translateY(1px); border-bottom-width: 1px; }
.btn svg { width: 17px; height: 17px; }
.btn.sm { padding: 10px 14px; font-size: 14px; border-radius: 11px; }
@media (max-width: 1080px) { .top-nav { display: none; } }
@media (max-width: 520px) { .top .btn.sm { display: none; } }

/* ── hero ───────────────────────────────────────────────────────── */
.hero { position: relative; padding: 64px 0 40px; }
.hero::before {
  content: ""; position: absolute; inset: -64px 0 auto; height: 720px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 340px at 78% 30%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(500px 300px at 10% 0%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.eyebrow { font: 500 13px/1.4 var(--mono); color: var(--accent-ink); letter-spacing: .02em; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.eyebrow span + span::before { content: "·"; margin-right: 14px; color: var(--faint); }
h1 {
  font-size: clamp(36px, 4.9vw, 60px); line-height: 1.06; letter-spacing: -.035em; font-weight: 700;
  margin: 18px 0 22px;
}
h1 .ar { color: var(--accent); font-weight: 500; }
.hero-text { container-type: inline-size; min-width: 0; }
/* размер от ширины колонки: самая длинная строка («Номер задачи → ссылка.») всегда помещается */
.hero h1 { font-size: clamp(26px, 3.6vw, 52px); }
@supports (font-size: 1cqi) { .hero h1 { font-size: clamp(26px, 7.9cqi, 52px); } }
.nw { white-space: nowrap; }
.hero h1 .ln { display: block; }
.hero h1 .ln { white-space: nowrap; }
.hero h1 + .lead { margin-top: 4px; }
h1 .kc { font-size: .62em; vertical-align: .14em; border-radius: 12px; border-bottom-width: 4px; }
.lead { font-size: 19px; line-height: 1.55; color: var(--dim); max-width: 34em; margin: 0 0 30px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.req { margin-top: 22px; font: 400 13px/1.6 var(--mono); color: var(--faint); display: flex; flex-wrap: wrap; gap: 4px 16px; }
.req span::before { content: "✓ "; color: var(--ok); }
.req .ver { color: var(--accent-ink); font-weight: 500; }
.req .ver::before { content: none; }
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero { padding-top: 36px; }
}

/* ── сцена: «экран Mac» с палитрой ────────────────────────────────── */
.stage {
  position: relative; height: 500px;
  border-radius: 20px; overflow: hidden;
  background: linear-gradient(160deg, var(--desk-a), var(--desk-b));
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  user-select: none; -webkit-user-select: none;
}
.stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70% 60% at 70% 20%, rgba(255,255,255,.18), transparent 70%);
}
.mbar {
  position: absolute; inset: 0 0 auto; height: 26px; z-index: 3;
  display: flex; align-items: center; gap: 14px; padding: 0 12px;
  background: color-mix(in srgb, var(--card) 70%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 12px; color: var(--fg);
}
.mbar .app { font-weight: 600; }
.mbar .menus { display: flex; gap: 14px; color: var(--dim); }
.mbar .r { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.mbar .mb-ico { width: 16px; height: 16px; color: var(--fg); }
.mbar .mb-mic { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: 5px; transition: background .2s, color .2s; }
.mbar .mb-mic.muted { background: var(--rec); color: #fff; }
.mbar .mb-mic svg { width: 13px; height: 13px; }
.mbar .mb-hop { display: grid; place-items: center; padding: 2px 5px; border-radius: 5px; }
.mbar .mb-hop.on { background: color-mix(in srgb, var(--fg) 14%, transparent); }
.mbar .mono { font-size: 11.5px; }

/* окно мессенджера под палитрой */
.chat {
  position: absolute; left: 6%; right: 6%; top: 15%; bottom: 13%;
  background: var(--card); border-radius: 12px; border: 1px solid var(--line);
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.35);
  display: flex; flex-direction: column; overflow: hidden;
  transition: filter .25s;
}
.stage.open .chat { filter: saturate(.7) brightness(.96); }
.chat-h { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.chat-h .dots { display: flex; gap: 5px; margin-right: 6px; }
.chat-h .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.chat-h small { color: var(--faint); font-size: 12px; margin-left: auto; }
.chat-b { flex: 1; padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; font-size: 13px; overflow: hidden; }
.msg { display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: start; }
.msg .av { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: #fff; }
.msg b { font-size: 12.5px; }
.msg p { margin: 1px 0 0; color: var(--dim); line-height: 1.45; }
.msg .key { background: var(--accent-soft); color: var(--accent-ink); border-radius: 5px; padding: 0 4px; font-family: var(--mono); font-size: 12px; }
.msg.mine .av { background: var(--accent); color: var(--on-accent); }
.msg.new { animation: msgIn .35s ease both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } }
.composer { margin: 0 12px 12px; padding: 8px 11px; border-radius: 9px; border: 1px solid var(--line-2); font-size: 13px; color: var(--faint); min-height: 34px; display: flex; align-items: center; gap: 2px; }
.composer.filled { color: var(--fg); }
.composer .caret { width: 1.5px; height: 15px; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* подсказка про двойной ⌘ */
.tapme {
  position: absolute; left: 50%; bottom: 4.5%; transform: translateX(-50%); z-index: 2;
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px 7px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  border: 1px solid var(--line); font-size: 12.5px; color: var(--dim); white-space: nowrap;
  box-shadow: 0 8px 20px -10px rgba(0,0,0,.3);
}
.cmdkey {
  font: 500 15px/1 var(--sans); color: var(--fg);
  min-width: 46px; height: 30px; padding: 0 10px; border-radius: 8px; cursor: pointer;
  background: var(--key-top); border: 1px solid var(--line-2); border-bottom: 3px solid var(--key-side);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: transform .08s, border-bottom-width .08s;
}
.cmdkey small { font: 500 10px/1 var(--mono); color: var(--faint); }
.cmdkey.down, .cmdkey:active { transform: translateY(2px); border-bottom-width: 1px; }
.stage.open .tapme { opacity: 0; pointer-events: none; }
.tapme { transition: opacity .2s; }
.tapme .t-touch { display: none; }
.replay { border: 0; background: none; color: var(--faint); font: 500 11.5px/1 var(--mono); cursor: pointer; padding: 6px 4px; }
.replay:hover { color: var(--accent-ink); }
@media (hover: none) { .tapme .t-kbd { display: none; } .tapme .t-touch { display: inline; } }

/* палитра */
.pal {
  position: absolute; left: 50%; top: 50%; z-index: 5;
  width: min(470px, calc(100% - 24px));
  transform: translate(-50%, -48%) scale(.96); opacity: 0; pointer-events: none;
  transition: opacity .16s ease, transform .2s cubic-bezier(.2,.9,.3,1.2);
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid var(--glass-line); border-radius: 16px;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.45), 0 0 0 .5px rgba(0,0,0,.1);
  padding: 10px 10px 8px; font-size: 13px;
}
.stage.open .pal { opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: auto; }
.pal-h { display: flex; align-items: center; gap: 8px; padding: 2px 4px 8px; color: var(--faint); font-size: 12.5px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.pal-h svg { width: 15px; height: 15px; color: var(--fg); flex: none; }
.pal-h .q { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-h .kc { font-size: 10px; }
.pal-sec { display: flex; justify-content: space-between; padding: 7px 6px 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.pal-sec span { text-transform: none; letter-spacing: 0; font-weight: 400; font-family: var(--mono); font-size: 10px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tile {
  position: relative; text-align: left; cursor: pointer;
  padding: 8px 9px; border-radius: 11px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 60%, transparent); color: var(--fg);
  font: inherit; display: flex; flex-direction: column; gap: 3px; min-width: 0;
  transition: background .15s, border-color .15s;
}
.tile .ti { display: flex; align-items: center; gap: 6px; }
.tile .ti svg { width: 15px; height: 15px; flex: none; }
.tile b { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile small { font-size: 11px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .kc { position: absolute; right: 7px; top: 7px; font-size: 9.5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 5px; }
.tile.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.tile.on small { color: var(--accent-ink); }
.tile.mic.on { background: color-mix(in srgb, var(--rec) 14%, transparent); border-color: color-mix(in srgb, var(--rec) 45%, transparent); }
.tile.mic.on small { color: var(--rec); }
.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 9px; padding: 6px 7px; border-radius: 9px; cursor: pointer;
  background: none; border: 0; font: inherit; color: var(--fg); text-align: left; width: 100%;
}
.row svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.row span:not(.kc) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .kc { font-size: 9.5px; min-width: 19px; height: 19px; border-radius: 5px; padding: 0 4px; }
.sel { background: color-mix(in srgb, var(--accent) 24%, transparent) !important; }
.row:hover, .tile:hover { background: color-mix(in srgb, var(--fg) 6%, transparent); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 3px 4px 2px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 4px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 60%, transparent); font: inherit; font-size: 12px; color: var(--fg);
}
.chip i { font: 600 10px/1 var(--mono); font-style: normal; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 5px; color: #fff; background: var(--c); }
.pal-f { margin-top: 6px; padding: 7px 6px 1px; border-top: 1px solid var(--line); font: 400 10.5px/1.3 var(--mono); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* HUD и тосты */
.hud {
  position: absolute; left: 50%; top: 50%; z-index: 8; width: 150px; height: 150px;
  transform: translate(-50%, -50%) scale(.9); opacity: 0; pointer-events: none;
  border-radius: 26px; display: grid; place-content: center; justify-items: center; gap: 10px;
  background: color-mix(in srgb, var(--card) 80%, transparent);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px -14px rgba(0,0,0,.4); color: var(--fg); font-size: 13px; text-align: center;
  transition: opacity .2s, transform .25s cubic-bezier(.2,.9,.3,1.3);
}
.hud.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.hud svg { width: 54px; height: 54px; }
.toast {
  position: absolute; right: 12px; top: 36px; z-index: 9; width: min(300px, 80%);
  display: grid; grid-template-columns: 30px 1fr; gap: 9px; align-items: center;
  padding: 10px 12px; border-radius: 14px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line); box-shadow: 0 14px 34px -14px rgba(0,0,0,.4);
  transform: translateX(16px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s;
  font-size: 12px; line-height: 1.35;
}
.toast.show { opacity: 1; transform: none; }
.toast img { width: 30px; height: 30px; border-radius: 7px; }
.toast b { display: block; font-size: 12.5px; }
.toast span { color: var(--muted); word-break: break-word; }


/* hero-история: окна сцен, нажатые клавиши, подпись */
.win {
  position: absolute; left: 9%; right: 9%; top: 13%; bottom: 17%; z-index: 4;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden;
  box-shadow: 0 26px 60px -18px rgba(0,0,0,.5);
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(10px) scale(.98); pointer-events: none;
  transition: opacity .25s ease, transform .3s cubic-bezier(.2,.9,.3,1.1);
}
.win.show { opacity: 1; transform: none; }
.w-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--card-2); }
.w-bar .dots { display: flex; gap: 5px; }
.w-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.w-bar .url { flex: 1; display: flex; align-items: center; gap: 6px; justify-content: center; font: 400 11.5px/1 var(--mono); color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; white-space: nowrap; overflow: hidden; }
.w-bar .url svg { width: 11px; height: 11px; flex: none; }
.w-bar .url.plain { background: none; border: 0; font-family: var(--sans); font-size: 12.5px; color: var(--fg); font-weight: 500; }
.w-body { flex: 1; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; min-height: 0; }
.w-h { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.jr-key { font: 500 11.5px/1 var(--mono); color: var(--blue); }
.jr-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: 12px; align-items: center; }
.jr-meta .st { background: color-mix(in srgb, var(--blue) 18%, transparent); color: var(--blue); font-weight: 600; font-size: 11px; padding: 3px 7px; border-radius: 5px; text-transform: uppercase; letter-spacing: .03em; }
.jr-lines { display: grid; gap: 7px; margin-top: 8px; }
.jr-lines i { height: 8px; border-radius: 4px; background: var(--line); }
.call-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 10px; background: #15171c; }
.ct { position: relative; border-radius: 9px; background: #23262e; display: grid; place-items: center; min-height: 0; }
.ct .av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 13px; }
.ct.me .av { background: var(--accent); color: var(--on-accent); }
.ct small { position: absolute; left: 7px; bottom: 6px; display: flex; align-items: center; gap: 4px; font-size: 10.5px; color: #d9dce3; }
.ct small svg { width: 11px; height: 11px; }
.ct.me.muted small { color: #ff8a8d; }
.call-ctrl { display: flex; justify-content: center; gap: 8px; padding: 8px; background: #15171c; border-top: 1px solid rgba(255,255,255,.06); }
.cc { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 8px; background: #2a2d36; color: #e8eaf0; font-size: 11.5px; }
.cc svg { width: 13px; height: 13px; }
.cc.end { background: #d8434a; }
.cc.muted { background: #d8434a; }

.msg .key.hl { background: color-mix(in srgb, var(--blue) 35%, transparent); color: var(--fg); box-shadow: 0 0 0 2px color-mix(in srgb, var(--blue) 35%, transparent); }
.toast.press { transform: scale(.97); }

.keys-ov {
  position: absolute; left: 50%; bottom: 17%; z-index: 10; transform: translate(-50%, 8px);
  display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 14px;
  background: rgba(20, 18, 14, .78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: #fff; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .15s, transform .2s;
}
.keys-ov.show { opacity: 1; transform: translate(-50%, 0); }
.keys-ov b {
  min-width: 38px; height: 38px; padding: 0 9px; display: grid; place-items: center; border-radius: 9px;
  background: #fffaf0; color: #1e1a14; font: 600 18px/1 var(--sans);
  border-bottom: 3px solid #cdbf9f; animation: keyIn .22s cubic-bezier(.2,.9,.3,1.4) both;
}
.keys-ov b.wide { font-size: 15px; }
.keys-ov span { margin: 0 4px; color: rgba(255,255,255,.7); font: 500 11px/1 var(--mono); }
@keyframes keyIn { from { transform: translateY(4px) scale(.85); opacity: 0; } }

.cap {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 11;
  display: flex; align-items: center; gap: 10px; padding: 7px 7px 7px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); box-shadow: 0 10px 24px -12px rgba(0,0,0,.4); font-size: 13px;
}
.stage:not(.story) .cap, .stage.story .tapme { display: none; }
.cap-n { font-size: 11px; color: var(--accent-ink); flex: none; }
.cap-t { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; line-height: 1.3; }
.cap-t.swap { animation: msgIn .3s ease both; }
.cap-dots { display: none; }
.cap-dots i { width: 18px; height: 3px; border-radius: 2px; background: var(--line-2); transition: background .3s; }
.cap-dots i.on { background: var(--accent); }
.cap-try { flex: none; cursor: pointer; border: 1px solid var(--line-2); background: var(--card); color: var(--fg); font: 500 12px/1 var(--sans); padding: 8px 10px; border-radius: 9px; }
.cap-try:hover { border-color: var(--accent); }
@media (max-width: 560px) { .cap { flex-wrap: wrap; } .cap-t { flex-basis: calc(100% - 40px); } .cap-try { width: 100%; } .win { left: 4%; right: 4%; bottom: 24%; } .keys-ov { bottom: 26%; } }

/* ── секции ─────────────────────────────────────────────────────── */
section { scroll-margin-top: 72px; }
.sec { padding: 110px 0; }
.sec.alt { background: var(--bg-2); }
.sec-head { max-width: 760px; margin-bottom: 52px; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font: 500 13px/1 var(--mono); color: var(--accent-ink); letter-spacing: .02em; margin-bottom: 18px; }
.kicker .kc { font-size: 12px; }
h2 { font-size: clamp(32px, 4.2vw, 50px); line-height: 1.06; letter-spacing: -.03em; font-weight: 700; margin: 0 0 18px; }
h3 { font-size: 21px; line-height: 1.25; letter-spacing: -.01em; margin: 0 0 8px; font-weight: 600; }
.story { font-size: 18px; line-height: 1.6; color: var(--dim); margin: 0; }
.story + .story { margin-top: 14px; }
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; align-items: center; }
.split.flip > :first-child { order: 2; }
@media (max-width: 960px) { .split, .split.flip { grid-template-columns: minmax(0, 1fr); gap: 36px; } .split.flip > :first-child { order: 0; } .sec { padding: 76px 0; } }
.facts { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.facts li { position: relative; padding-left: 30px; color: var(--dim); font-size: 16px; line-height: 1.5; }
.aside { margin: 24px 0 0; padding: 14px 18px; border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; background: var(--accent-soft); color: var(--dim); font-size: 15.5px; line-height: 1.5; }
.facts li::before { content: ""; position: absolute; left: 6px; top: 8px; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* зачем: без Hopkey / с Hopkey */
.why { display: grid; gap: 14px; }
.why-r {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1.2fr);
  border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--card);
}
.why-r > div { padding: 22px 24px 24px; }
.why-s { display: flex; flex-direction: column; gap: 14px; }
.why-s .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.why-s .ico svg { width: 22px; height: 22px; }
.why-s h3 { margin: 0; font-size: 19px; }
.why-s a { margin-top: auto; font: 500 13px/1 var(--mono); color: var(--accent-ink); text-decoration: none; }
.why-s a:hover { text-decoration: underline; }
.why-no { background: var(--card-2); border-left: 1px solid var(--line); }
.why-yes { background: var(--accent-soft); border-left: 1px solid var(--line); }
.why .lbl { display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 500 12px/1 var(--mono); color: var(--faint); margin-bottom: 16px; }
.why .lbl span { padding: 5px 9px; border-radius: 999px; background: color-mix(in srgb, var(--fg) 7%, transparent); white-space: nowrap; }
.why-yes .lbl { color: var(--accent-ink); }
.why-yes .lbl span { background: var(--accent); color: var(--on-accent); }
.why ol { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 9px; }
.why li { counter-increment: s; position: relative; padding-left: 32px; font-size: 15px; line-height: 1.45; color: var(--muted); min-height: 22px; }
.why li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 6px;
  font: 500 11px/22px var(--mono); text-align: center;
  background: color-mix(in srgb, var(--fg) 7%, transparent); color: var(--faint);
}
.why-no li { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--faint) 55%, transparent); }
.why-yes li { color: var(--fg); font-weight: 500; }
.why-yes li::before { background: var(--accent); color: var(--on-accent); }
@media (max-width: 860px) {
  .why-r { grid-template-columns: minmax(0, 1fr); }
  .why-no, .why-yes { border-left: 0; border-top: 1px solid var(--line); }
  .why-s a { margin-top: 0; }
}

/* демо: ключ → ссылка */
.kl { padding: 20px; }
.kl label { display: block; font: 500 12px/1 var(--mono); color: var(--faint); margin: 0 0 9px; }
.kl textarea {
  width: 100%; min-height: 92px; resize: vertical;
  font: 400 15px/1.5 var(--sans); color: var(--fg);
  background: var(--card-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px;
}
.kl textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 0; }
.kl-out { margin-top: 14px; display: flex; flex-direction: column; gap: 7px; min-height: 40px; }
.kl-hit {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 9px 12px; border-radius: 11px; background: var(--card-2); border: 1px solid var(--line);
  animation: msgIn .25s ease both; font-size: 14px;
}
.kl-hit .k { font: 500 13px/1 var(--mono); color: var(--accent-ink); background: var(--accent-soft); padding: 5px 8px; border-radius: 7px; }
.kl-hit .u { font: 400 12.5px/1.3 var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kl-hit .p { font: 500 11px/1 var(--mono); color: var(--faint); }
.kl-empty { color: var(--faint); font-size: 14px; padding: 10px 2px; }
.tpl { margin-top: 18px; border-top: 1px dashed var(--line-2); padding-top: 14px; display: grid; gap: 6px; }
.tpl-r { display: grid; grid-template-columns: 92px minmax(0, 1fr) 14px minmax(0, 1.6fr); gap: 10px; align-items: center; font: 400 12.5px/1.4 var(--mono); color: var(--muted); }
.tpl-r b { font-family: var(--sans); font-weight: 600; font-size: 13px; color: var(--fg); }
.tpl-r .re { color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-r .ar { color: var(--faint); }
.tpl-r .url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-r .url em { font-style: normal; color: var(--accent-ink); }
@media (max-width: 560px) { .tpl-r { grid-template-columns: 1fr; gap: 1px; padding: 6px 0; } .tpl-r .ar { display: none; } }

.banner {
  margin-top: 18px; display: grid; grid-template-columns: 34px 1fr auto; gap: 11px; align-items: center;
  padding: 11px 14px; border-radius: 15px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  font-size: 13.5px; line-height: 1.35;
}
.banner img { width: 34px; height: 34px; border-radius: 8px; }
.banner span { color: var(--muted); }
.banner small { font: 400 11px/1 var(--mono); color: var(--faint); align-self: start; }

/* демо: сниппеты */
.snip { padding: 16px; }
.snip-h { display: flex; align-items: center; gap: 8px; padding: 2px 4px 12px; font-size: 14px; font-weight: 600; }
.snip-h .kc { margin-left: auto; font-size: 11px; }
.snip-list { display: flex; flex-direction: column; gap: 4px; }
.snip-r {
  display: grid; grid-template-columns: 26px 1fr auto; gap: 11px; align-items: center;
  padding: 9px 10px; border-radius: 11px; cursor: pointer; border: 0; background: none; font: inherit; color: var(--fg); text-align: left; width: 100%;
}
.snip-r i { font: 600 12px/1 var(--mono); font-style: normal; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: var(--c); }
.snip-r b { font-weight: 500; font-size: 15px; display: block; }
.snip-r small { font: 400 12px/1.3 var(--mono); color: var(--faint); }
.snip-r .lock { width: 15px; height: 15px; color: var(--faint); }
.snip-r:hover, .snip-r.sel { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.field { margin-top: 14px; padding: 12px; border-radius: 13px; background: var(--card-2); border: 1px solid var(--line); }
.field label { display: block; font: 500 11.5px/1 var(--mono); color: var(--faint); margin-bottom: 8px; }
.field .in { min-height: 40px; display: flex; align-items: center; gap: 2px; padding: 0 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line-2); font: 400 15px/1 var(--mono); }
.field .in .caret { width: 1.5px; height: 18px; background: var(--accent); animation: blink 1s steps(1) infinite; }
.field .note { margin-top: 8px; font-size: 12.5px; color: var(--faint); min-height: 1.4em; }

/* демо: звук */
.snd { padding: 18px; display: grid; gap: 14px; }
.snd-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 11px; background: var(--card-2); border: 1px solid var(--line); font-size: 13px; }
.snd-bar .r { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.call { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; padding: 14px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); }
.call .av { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, var(--blue), var(--violet)); display: grid; place-items: center; color: #fff; }
.call .av svg { width: 22px; height: 22px; }
.call b { display: block; font-size: 15px; }
.call small { color: var(--faint); font-size: 13px; }
.mutebtn {
  grid-column: 1 / -1; justify-content: center;
  display: inline-flex; align-items: center; gap: 9px; padding: 10px 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--card); color: var(--fg); font: 500 14px/1 var(--sans);
}
.mutebtn svg { width: 17px; height: 17px; }
.mutebtn.muted { background: var(--rec); border-color: transparent; color: #fff; }
.mutebtn .kc { font-size: 10.5px; }
.mutebtn.muted .kc { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.3); color: #fff; }
.lvls { display: grid; gap: 10px; padding: 4px 2px 2px; }
.lvl { display: grid; grid-template-columns: 18px 128px 1fr 40px; gap: 10px; align-items: center; font-size: 13.5px; }
.lvl svg { width: 17px; height: 17px; color: var(--muted); }
.lvl span { color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lvl input { width: 100%; accent-color: var(--accent); }
.lvl output { font: 400 12px/1 var(--mono); color: var(--faint); text-align: right; }
@media (max-width: 480px) { .lvl { grid-template-columns: 18px 1fr 40px; } .lvl span { display: none; } }

/* ещё под рукой */
.more { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.mod { padding: 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.mod .kc { font-size: 13px; margin-bottom: 14px; }
.mod h3 { font-size: 17px; margin-bottom: 6px; }
.mod p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
@media (max-width: 1000px) { .more { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .more { grid-template-columns: 1fr; } }

/* раскладка */
.layout { padding: 28px; display: grid; gap: 22px; }
.krow { display: flex; gap: 7px; justify-content: center; }
.bigkey {
  width: 58px; height: 58px; border-radius: 12px; position: relative; flex: 0 1 58px; min-width: 0;
  background: var(--key-top); border: 1px solid var(--line-2); border-bottom: 5px solid var(--key-side);
  font: 500 19px/1 var(--sans); color: var(--fg);
  display: grid; place-items: center;
}
.bigkey .ru { position: absolute; right: 8px; bottom: 6px; font-size: 12px; color: var(--faint); }
.bigkey.hot { background: var(--accent); border-color: color-mix(in srgb, var(--accent) 60%, #000); color: var(--on-accent); }
.bigkey.hot .ru { color: color-mix(in srgb, var(--on-accent) 60%, transparent); }
.bigkey.press { transform: translateY(3px); border-bottom-width: 2px; }
.kmap { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kmap div { padding: 14px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.kmap b { display: block; color: var(--fg); font-size: 14px; margin-bottom: 4px; }
.kmap .bad b { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--rec); }
@media (max-width: 520px) { .layout { padding: 18px; } .tile .kc { display: none; } .tile { padding: 8px 7px; } .bigkey { height: 50px; font-size: 16px; } .kmap { grid-template-columns: 1fr; } }

.diff { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 8px; }
.diff div { padding: 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); }
.diff p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
@media (max-width: 760px) { .diff { grid-template-columns: 1fr; } }

/* приватность */
.priv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.priv div { padding: 22px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.priv svg { width: 26px; height: 26px; color: var(--accent-ink); margin-bottom: 14px; }
.priv p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.netline { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 16px 20px; border-radius: 14px; border: 1px dashed var(--line-2); font: 400 13.5px/1.5 var(--mono); color: var(--muted); }
.netline b { color: var(--fg); font-weight: 500; }
@media (max-width: 860px) { .priv { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-size: 18px; font-weight: 600; letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font: 400 24px/1 var(--mono); color: var(--faint); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: -4px 0 20px; color: var(--dim); font-size: 16.5px; line-height: 1.6; max-width: 46em; }

/* финал */
.final { text-align: center; padding: 120px 0 110px; position: relative; overflow: hidden; }
.final::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(520px 300px at 50% 30%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%);
}
.final img.app { width: 112px; height: 112px; margin: 0 auto 26px; border-radius: 26px; box-shadow: 0 24px 50px -18px rgba(120, 70, 0, .45); }
.final h2 { max-width: 14em; margin-left: auto; margin-right: auto; }
.final .story { max-width: 34em; margin: 0 auto 32px; }
.final .cta { justify-content: center; }
.final .req { justify-content: center; }
.family { margin: 30px auto 0; max-width: 34em; font-size: 15.5px; color: var(--muted); }
.family a { color: var(--accent-ink); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); white-space: nowrap; }
.family a:hover { border-bottom-color: var(--accent); }

footer { border-top: 1px solid var(--line); padding: 34px 0 44px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; }
footer .brand { font-size: 16px; }
footer .brand img { width: 26px; height: 26px; }
footer .motto { font: 500 11.5px/1 var(--mono); letter-spacing: .14em; color: var(--faint); }
footer nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer nav a { text-decoration: none; }
footer nav a:hover { color: var(--fg); }
footer .copy { width: 100%; font-size: 13px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer .copy a { color: var(--muted); }

/* появление при прокрутке */
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.js .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
