/* tihon.website — общий стиль: главная-презентация, справка, «Что нового», документы. */
:root {
  --bg: #fdf8f2;
  --bg-2: #f7ede1;
  --card: #ffffff;
  --text: #24170f;
  --muted: #76614f;
  --accent: #e8661b;
  --accent-2: #ff9a4d;
  --accent-text: #ffffff;
  --line: #efe0cd;
  --ok: #2f9e55;
  --shadow: 0 18px 50px rgba(120, 60, 20, .12);
  --hero-1: #2a1a10;
  --hero-2: #1a110b;
  --hero-text: #fff6ec;
  --hero-muted: #d9c1ab;
  --radius: 20px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15100c;
    --bg-2: #1c1510;
    --card: #211912;
    --text: #f6ebdf;
    --muted: #b8a391;
    --accent: #f07a2f;
    --accent-2: #ffab6b;
    --accent-text: #1b120b;
    --line: #34271d;
    --shadow: 0 18px 50px rgba(0, 0, 0, .35);
    --hero-1: #241710;
    --hero-2: #120c08;
  }
}
/* Фирменный шрифт Manrope — тот же, что в кабинете: сайт и кабинет выглядят одинаково.
   Файлы свои (/fonts), без внешних сервисов. */
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/fonts/manrope-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/fonts/manrope-latin.woff2) format('woff2'); 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; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--accent); color: var(--accent-text);
  text-decoration: none; font-weight: 650; padding: 14px 24px; border-radius: 14px; font-size: 17px;
  border: 0; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
  box-shadow: 0 8px 24px rgba(232, 102, 27, .28);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(232, 102, 27, .36); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.ghost { background: transparent; color: inherit; border: 1.5px solid currentColor; box-shadow: none; opacity: .9; }
.btn.ghost:hover { opacity: 1; }
.btn.light { background: rgba(255, 255, 255, .1); color: var(--hero-text); border: 1.5px solid rgba(255, 255, 255, .22); box-shadow: none; }
.btn.tg { background: #2aabee; color: #fff; box-shadow: none; }
.btn.ya { background: #fc3f1d; color: #fff; box-shadow: none; }

/* ---------- Шапка ---------- */
.topbar { position: sticky; top: 0; z-index: 10; -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); background: var(--bg); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 750; font-size: 20px; }
.brand img { width: 36px; height: 36px; border-radius: 50%; }
.topbar nav { display: flex; gap: 22px; margin-left: auto; }
.topbar nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 550; }
.topbar nav a:hover { color: var(--text); }
.topbar .btn { padding: 9px 16px; font-size: 15px; box-shadow: none; }
@media (max-width: 760px) { .topbar nav { display: none; } .topbar .btn { margin-left: auto; } }

/* ---------- Первый экран ---------- */
.hero-dark {
  background: radial-gradient(1100px 520px at 78% 18%, rgba(240, 122, 47, .35), transparent 60%),
              radial-gradient(700px 400px at 8% 90%, rgba(255, 154, 77, .14), transparent 60%),
              linear-gradient(180deg, var(--hero-1), var(--hero-2));
  color: var(--hero-text);
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding-top: 72px; padding-bottom: 80px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--accent-2); background: rgba(255, 154, 77, .12); border: 1px solid rgba(255, 154, 77, .25); padding: 6px 12px; border-radius: 999px; }
.hero-dark h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.06; letter-spacing: -1.2px; margin: 20px 0 18px; }
.hero-dark h1 span { background: linear-gradient(90deg, #ffb27a, #f07a2f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-dark .lead { font-size: 19px; color: var(--hero-muted); max-width: 560px; margin: 0 0 30px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--hero-muted); }
.hero-note a { color: var(--hero-text); }
.points { display: flex; flex-wrap: wrap; gap: 18px 26px; margin-top: 30px; color: var(--hero-muted); font-size: 15px; }
.points span::before { content: "✓"; color: var(--accent-2); font-weight: 700; margin-right: 8px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 56px; } }

/* ---------- Телефон ---------- */
.phones { position: relative; display: flex; justify-content: center; align-items: center; min-height: 520px; }
.phone {
  width: 260px; height: 563px; aspect-ratio: 9 / 19.5; border-radius: 38px; padding: 9px;
  background: linear-gradient(160deg, #3a2a20, #120c08); box-shadow: 0 30px 80px rgba(0, 0, 0, .5), inset 0 0 0 1.5px rgba(255, 255, 255, .08);
  flex: none;
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 30px; display: block; background: #1b120b; }
.phones .phone.back { position: absolute; transform: translateX(-120px) rotate(-8deg) scale(.86); opacity: .75; }
.phones .phone.front { position: relative; transform: translateX(50px) rotate(3deg); }
@media (max-width: 900px) { .phones { min-height: 460px; } .phone { width: 220px; height: 477px; } .phones .phone.back { transform: translateX(-80px) rotate(-8deg) scale(.86); } .phones .phone.front { transform: translateX(40px) rotate(3deg); } }

/* ---------- Разделы ---------- */
section.block { padding: 84px 0; }
section.block.alt { background: var(--bg-2); }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head .kicker, .proxy-card .kicker { color: var(--accent); font-weight: 700; font-size: 14px; letter-spacing: .6px; text-transform: uppercase; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.12; letter-spacing: -.6px; margin: 8px 0 12px; }
.section-head p { color: var(--muted); font-size: 18px; margin: 0; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(240, 122, 47, .18), rgba(255, 171, 107, .1)); color: var(--accent); margin-bottom: 16px; }
.feature .ico svg { width: 24px; height: 24px; }
.feature h3 { margin: 0 0 6px; font-size: 19px; }
.feature p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* Скриншоты */
.shots { display: flex; gap: 22px; overflow-x: auto; padding: 10px 4px 26px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.shot { flex: none; width: 240px; scroll-snap-align: start; text-align: center; }
.shot .phone { width: 240px; height: 520px; }
.shot figcaption { margin-top: 14px; font-weight: 650; }
.shot figcaption span { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }

/* Шаги */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
@media (max-width: 760px) { .steps-grid { grid-template-columns: 1fr; } }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; counter-increment: s; }
.step::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-weight: 750; margin-bottom: 14px; }
.step h3 { margin: 0 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* Скачать */
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
@media (max-width: 900px) { .downloads { grid-template-columns: 1fr; } }
.dl { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.dl.main { border-color: var(--accent); box-shadow: var(--shadow); }
.dl h3 { margin: 0; font-size: 21px; display: flex; align-items: center; gap: 10px; }
.dl h3 svg { width: 26px; height: 26px; color: var(--accent); }
.dl p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.dl .links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.dl .btn { padding: 11px 18px; font-size: 15.5px; }
.ver { align-self: flex-start; display: inline-block; font-size: 13px; font-weight: 650; color: var(--ok); background: rgba(47, 158, 85, .12); background: color-mix(in srgb, var(--ok) 12%, transparent); padding: 3px 10px; border-radius: 999px; }

/* Вопросы */
.faq { max-width: 820px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px 22px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 650; padding: 16px 0; list-style: none; position: relative; padding-right: 30px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 24px; color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* Призыв внизу */
.final { text-align: center; padding: 72px 16px; border-radius: 28px; color: var(--hero-text);
  background: radial-gradient(600px 300px at 50% 0%, rgba(240, 122, 47, .4), transparent 70%), linear-gradient(180deg, var(--hero-1), var(--hero-2)); }
.final h2 { font-size: clamp(28px, 4vw, 44px); margin: 16px 0 10px; letter-spacing: -.6px; }
.final p { color: var(--hero-muted); margin: 0 auto 26px; max-width: 560px; }
.final img { width: 84px; height: 84px; border-radius: 50%; }
.final .cta { justify-content: center; }

/* ---------- Подвал ---------- */
footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 28px 0 44px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }
footer .brand { font-size: 16px; margin-right: auto; }
footer .brand img { width: 28px; height: 28px; }

/* ---------- Документы, «Что нового» (старые страницы) ---------- */
header.hero { text-align: center; padding: 48px 0 24px; }
header.hero img { width: 120px; height: 120px; border-radius: 50%; box-shadow: 0 10px 30px rgba(232, 102, 27, .25); }
h1 { font-size: 40px; margin: 18px 0 8px; letter-spacing: -.5px; }
.lead { font-size: 19px; color: var(--muted); margin: 0 auto 26px; max-width: 600px; }
.note { color: var(--muted); font-size: 14px; margin-top: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; margin: 14px 0; }
.card h2 { font-size: 21px; margin: 4px 0 8px; }
.badge { display: inline-block; font-size: 12px; font-weight: 650; background: var(--accent); color: var(--accent-text); padding: 2px 9px; border-radius: 999px; vertical-align: middle; }
.doc { padding: 32px 16px 0; max-width: 760px; }
.doc h1 { font-size: 34px; }
.doc h2 { font-size: 22px; margin-top: 30px; }
.back { display: inline-block; margin-top: 8px; text-decoration: none; }
.slogan { color: var(--accent); font-weight: 650; font-size: 18px; margin: -4px 0 14px; }

/* ---------- Справка ---------- */
.kb { display: grid; grid-template-columns: 250px 1fr; gap: 40px; padding: 40px 0 0; }
@media (max-width: 900px) { .kb { grid-template-columns: 1fr; gap: 0; } }
.kb-nav { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; font-size: 15px; }
.kb-nav a { display: block; color: var(--muted); text-decoration: none; padding: 5px 10px; border-radius: 8px; }
.kb-nav a:hover { color: var(--text); background: var(--bg-2); }
.kb-nav b { display: block; margin: 16px 10px 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--accent); }
@media (max-width: 900px) { .kb-nav { position: static; max-height: none; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px; margin-bottom: 24px; } }
.kb-body h1 { font-size: clamp(32px, 4vw, 44px); margin-top: 0; }
.kb-body h2 { font-size: 26px; margin: 48px 0 10px; padding-top: 12px; scroll-margin-top: 80px; border-top: 1px solid var(--line); }
.kb-body h3 { font-size: 19px; margin: 26px 0 6px; scroll-margin-top: 80px; }
.kb-body p, .kb-body li { color: var(--text); }
.kb-body li { margin: 6px 0; }
.kb-body .path { display: inline-block; font-size: 14px; color: var(--muted); background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 1px 8px; }
.kb-body table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 10px 0; }
.kb-body th, .kb-body td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.kb-body th { color: var(--muted); font-weight: 600; }
.tip { background: var(--card); background: color-mix(in srgb, var(--accent) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 14px; padding: 14px 18px; margin: 14px 0; }
.warn { background: var(--card); background: color-mix(in srgb, #d93025 8%, var(--card)); border: 1px solid color-mix(in srgb, #d93025 30%, var(--line)); border-radius: 14px; padding: 14px 18px; margin: 14px 0; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: middle; margin-right: 4px; }
.kb-search { width: 100%; font: inherit; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--text); margin: 6px 0 10px; }

/* ---------- Вход на телевизоре ---------- */
.tv-page { text-align: center; padding-top: 48px; }
.tv-fox { width: 96px; height: 96px; border-radius: 50%; }
.tv-page .card { text-align: left; }
.tv-buttons { display: flex; flex-direction: column; gap: 10px; max-width: 340px; margin: 16px auto; }

/* История лисички */
.story-grid { display: grid; grid-template-columns: 260px 1fr; gap: 48px; align-items: center; }
.story-fox { width: 100%; max-width: 260px; height: auto; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 20px 60px rgba(232, 102, 27, .25); }
.story p { font-size: 18px; color: var(--muted); max-width: 720px; }
@media (max-width: 760px) { .story-grid { grid-template-columns: 1fr; gap: 20px; } .story-fox { max-width: 140px; } }

/* Подсказка во встроенном браузере Telegram (dl.js) */
.tgbar { position: sticky; top: 0; z-index: 40; background: #f2b21b; color: #24170f; padding: 12px 16px; font-size: 15px; line-height: 1.45; text-align: center; }

/* Плашка «Вас пригласил друг» (ref.js) */
.invite { display: grid; gap: 3px; max-width: 520px; margin-bottom: 18px; padding: 14px 18px; border-radius: 18px; text-decoration: none; color: var(--hero-text);
  background: linear-gradient(135deg, rgba(240, 122, 47, .28), rgba(255, 154, 77, .12)); border: 1px solid rgba(255, 154, 77, .4); animation: inviteIn .5s ease both; }
.invite[hidden] { display: none; }
.invite b { font-size: 16px; }
.invite span { opacity: .9; font-size: 14.5px; }
.invite u { text-decoration: none; color: var(--accent-2); font-weight: 650; font-size: 14px; }
.invite:hover u { text-decoration: underline; }
@keyframes inviteIn { from { opacity: 0; transform: translateY(-6px); } }

/* Блок «Прокси для Telegram» на главной */
.proxy-card { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 28px 32px; border-radius: 24px;
  background: linear-gradient(135deg, rgba(91, 184, 255, .14), rgba(36, 119, 224, .06)); border: 1px solid rgba(91, 184, 255, .3); }
.proxy-card h2 { margin: 4px 0 8px; }
.proxy-card p { margin: 0; color: var(--muted); }
.proxy-ic { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; font-size: 36px; background: linear-gradient(135deg, #5bb8ff, #2477e0); }
@media (max-width: 760px) { .proxy-card { grid-template-columns: 1fr; padding: 22px; } }
