@font-face {
  font-family: "Onest";
  src: url("/fonts/onest-cyrillic.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  src: url("/fonts/onest-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #15161a;
  --ink: #f6f4ef;
  --muted: #a7a6a2;
  --line: #2c2d33;
  --surface: #1f2026;
  --accent: #ffd000;
  --accent-ink: #15161a;
  --radius: 18px;
  --wrap: 1120px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 5.5vw, 4.25rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 700; margin-bottom: 32px; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.nw { white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top__row { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.04em; text-decoration: none; }
.nav { display: none; gap: 24px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--ink); }
.top .btn { margin-left: auto; }
.wide { display: none; }
@media (min-width: 480px) { .wide { display: inline; } }
@media (min-width: 880px) { .nav { display: flex; } .top .btn { margin-left: 0; } }
section[id] { scroll-margin-top: 80px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-family: inherit; font-size: 1rem; font-weight: 600; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -10px var(--accent); }
.btn:disabled { opacity: 0.6; cursor: progress; transform: none; box-shadow: none; }
.btn--small { min-height: 40px; padding: 0 16px; font-size: 0.9rem; white-space: nowrap; }

/* hero */
.hero { padding: 56px 0 72px; }
.hero__grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) {
  .hero { padding: 96px 0 112px; }
  .hero__grid { grid-template-columns: 1.1fr 0.9fr; }
}
.eyebrow { color: var(--muted); font-weight: 500; margin-bottom: 16px; }
.lead { font-size: 1.25rem; color: var(--muted); margin-top: 20px; max-width: 32ch; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 32px; }
.note { color: var(--muted); font-size: 0.95rem; }

/* chat mockup: the client bubble is the icon's outline, the assistant bubble its orange fill */
.chat {
  position: relative;
  margin: 0; padding: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px;
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.6);
}
.chat__head {
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
  font-size: 0.85rem; color: var(--muted);
}
.chat__head::after { content: ""; width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: var(--accent); }
.chat__log { list-style: none; margin: 0; padding: 16px 0 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; }
.msg { max-width: 85%; padding: 12px 16px; border-radius: var(--radius); font-size: 0.95rem; line-height: 1.45; }
.msg--in { align-self: flex-start; border: 2px solid var(--ink); border-bottom-left-radius: 6px; }
.msg--out { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; }
.chat figcaption { margin-top: 14px; font-size: 0.8rem; color: var(--muted); text-align: center; }
/* live playback (chat.js): hidden until shown, typing dots before each reply */
.chat--live .msg { display: none; }
.chat--live .msg.is-shown { display: block; animation: pop 0.35s ease both; }
.chat--live .msg--typing { display: flex; gap: 5px; align-items: center; padding: 16px 18px; animation: pop 0.25s ease both; }
.msg--typing span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: typing 1.2s ease-in-out infinite; }
.msg--typing span:nth-child(2) { animation-delay: 0.15s; }
.msg--typing span:nth-child(3) { animation-delay: 0.3s; }
.chat__log.is-fading .msg { opacity: 0; transition: opacity 0.45s ease; }
.chat__log--measure { position: absolute; top: 0; left: 0; visibility: hidden; }
.chat--live .chat__log--measure .msg { display: block; animation: none; }
@keyframes typing { 0%, 70%, 100% { opacity: 0.3; transform: none; } 35% { opacity: 1; transform: translateY(-3px); } }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }

/* sections */
.section { padding: 72px 0; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .section { padding: 104px 0; } }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card h3 { margin-bottom: 8px; }
.card h3::before { content: ""; display: block; width: 28px; height: 6px; margin-bottom: 16px; border-radius: 3px; background: var(--accent); }
.card p { color: var(--muted); }

.channels { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 112px)); gap: clamp(8px, 3vw, 16px); }
.channel { display: grid; justify-items: center; gap: 10px; text-align: center; }
.channel__icon {
  display: grid; place-items: center; width: min(100%, 72px); aspect-ratio: 1;
  border: 2px solid var(--line); border-radius: 50%; color: var(--ink);
}
.channel__icon svg { display: block; width: 45%; height: auto; }
.channel__name { font-size: 0.9rem; font-weight: 500; line-height: 1.25; color: var(--muted); }
@media (max-width: 480px) { .channel__name { font-size: 0.75rem; } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 32px; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 16px;
  border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700;
}
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--muted); }

.price__big { font-size: clamp(2.8rem, 7vw, 5rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.price__big span { font-size: 0.4em; font-weight: 500; color: var(--muted); }
.price__sub { margin-top: 12px; color: var(--muted); }
.price .btn { margin-top: 32px; }

/* contacts */
.contacts__grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .contacts__grid { grid-template-columns: 1fr 1fr; } }
#contacts h2 { margin-bottom: 16px; }
.contacts__mail { margin-top: 24px; font-size: 1.3rem; font-weight: 600; }
.form { display: grid; gap: 16px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.field { display: grid; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.field em { font-style: normal; opacity: 0.8; }
input, textarea {
  width: 100%; padding: 12px 14px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.85rem; color: var(--muted); }
.check input { flex: none; width: 18px; height: 18px; margin-top: 2px; padding: 0; accent-color: var(--accent); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__status { min-height: 1.4em; font-size: 0.9rem; }
.form__done { font-size: 1.15rem; font-weight: 600; }

/* footer */
.foot { padding: 32px 0; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.foot__row { display: grid; gap: 8px; }
@media (min-width: 900px) { .foot__row { grid-template-columns: 1fr auto; gap: 24px; } }

/* privacy page */
.doc { max-width: 720px; margin: 0 auto; padding: 56px 16px 96px; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 24px; }
.doc h2 { font-size: 1.3rem; margin: 32px 0 12px; }
.doc p + p, .doc ul { margin-top: 12px; }
.doc li + li { margin-top: 6px; }
.doc ul { padding-left: 1.2em; }
.doc__table { width: 100%; margin-top: 12px; border-collapse: collapse; }
.doc__table th, .doc__table td { padding: 10px 12px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.doc__table th { width: 8.5em; font-weight: 600; }
@media (max-width: 560px) { .doc__table th, .doc__table td { display: block; width: auto; } .doc__table td { border-top: 0; padding-top: 0; } }
