/*
 * SibCall — сайт приложения.
 *
 * Шрифты системные, внешних подключений нет вовсе: страница о приватности,
 * которая первым делом отдаёт адрес посетителя чужому шрифтовому серверу,
 * противоречила бы сама себе.
 */

:root {
  /* Гамма логотипа SD: синий → фиолетовый → красный (assets/logo.svg). */
  --brand-light: #8ea2ff;   /* светлый синий: подложки и текст на тёмном фоне */
  --brand-mid: #2440b8;
  --brand: #052c91;
  --brand-violet: #6b2782;
  --brand-red: #ec091b;
  --brand-grad: linear-gradient(135deg, var(--brand) 0%, var(--brand-violet) 100%);
  --call-grad: linear-gradient(135deg, #861e79, #cc113e 50%, #ec091b);
  --ok: #34c759;

  --bg: #ffffff;
  --bg-tint: #f3f8fd;
  --surface: #ffffff;
  --text: #0e1a26;
  --muted: #5b6b7a;
  --line: #dde6ee;
  --shadow: 0 10px 30px rgba(0, 46, 147, 0.08), 0 2px 6px rgba(14, 26, 38, 0.05);

  --radius: 18px;
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a121b;
    --bg-tint: #0f1a25;
    --surface: #111f2c;
    --text: #e8f0f7;
    --muted: #93a4b4;
    --line: #1f3243;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) { a { color: var(--brand-light); } }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  word-break: break-all;
}

:focus-visible { outline: 3px solid var(--brand-mid); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--brand);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 100;
}
.skip:focus { left: 8px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.wrap--narrow { max-width: 780px; }

/* ---------------------------------------------------------------- шапка */

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.top__row { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.top__nav { display: flex; align-items: center; gap: 22px; }
.top__nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: 15px; }
.top__nav a:not(.btn):hover { color: var(--text); }

@media (max-width: 720px) {
  .top__nav a:not(.btn) { display: none; }
}

/* ---------------------------------------------------------------- кнопки */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  padding: 12px 20px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn--primary {
  color: #fff;
  background: var(--brand-grad);
  box-shadow: 0 8px 20px rgba(0, 46, 147, 0.28);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(0, 46, 147, 0.34); }

.btn--small {
  padding: 8px 14px;
  font-size: 15px;
  color: #fff;
  background: var(--brand);
}

.btn--large { padding: 16px 28px; font-size: 18px; border-radius: 14px; }

.btn[aria-disabled="true"] {
  background: var(--line);
  color: var(--muted);
  box-shadow: none;
  pointer-events: none;
}

/* ---------------------------------------------------------------- первый экран */

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 88px;
  background:
    radial-gradient(900px 480px at 85% -10%, color-mix(in srgb, var(--brand-red) 12%, transparent), transparent 70%),
    radial-gradient(700px 420px at -10% 110%, color-mix(in srgb, var(--brand-mid) 18%, transparent), transparent 70%),
    var(--bg);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}


.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 4px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand-light) 20%, transparent);
  border-radius: 999px;
}
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--brand-light); } }

h1 {
  margin: 0 0 20px;
  font-size: clamp(34px, 5.4vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); margin: 0 0 32px; max-width: 34em; }

.cta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.cta__note { margin: 0; font-size: 14px; color: var(--muted); }

/* Макет телефона на первом экране — рисунок, а не скриншот: ничей настоящий
   разговор и ничьи настоящие данные в нём не показаны. */
.hero__art { position: relative; display: grid; place-items: center; min-height: 420px; }

.phone {
  width: 230px;
  height: 460px;
  border-radius: 38px;
  padding: 12px;
  background: linear-gradient(160deg, #1b2b3b, #0a121b);
  box-shadow: 0 30px 70px rgba(0, 46, 147, 0.25), inset 0 0 0 2px rgba(255, 255, 255, 0.06);
  animation: float 6s ease-in-out infinite;
}

.phone__screen {
  height: 100%;
  border-radius: 28px;
  background: radial-gradient(120% 80% at 50% 0%, #2a2470, #07111b 70%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 44px 16px 26px;
}

.phone__avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 700;
  background: var(--call-grad);
}

.phone__name { margin-top: 14px; font-size: 20px; font-weight: 700; }
.phone__state { font-size: 14px; color: rgba(255, 255, 255, 0.6); }

.phone__code {
  margin-top: 22px;
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  text-align: center;
}
.phone__code span { display: block; font-size: 11px; color: rgba(255, 255, 255, 0.6); }
.phone__code strong { font-family: var(--mono); font-size: 22px; letter-spacing: 3px; }

.phone__buttons { margin-top: auto; display: flex; gap: 16px; }
.phone__buttons i {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}
.phone__buttons i.end { background: #ff453a; }

.lock {
  position: absolute;
  font-size: 30px;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: float 7s ease-in-out infinite;
}
.lock--one { top: 12%; left: 6%; animation-delay: -2s; }
.lock--two { bottom: 14%; right: 6%; animation-delay: -4s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Стоит после основных правил первого экрана: при равной специфичности
   побеждает то, что ниже, — выше этот блок просто перебивался бы. */
@media (max-width: 880px) {
  .hero { padding: 40px 0 56px; }
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  /* На телефоне первым — текст и кнопка «Скачать»: ради неё сюда и пришли,
     а картинка во весь экран отодвигала её за нижний край. */
  .hero__art { min-height: 0; }
  .phone { width: 190px; height: 380px; border-radius: 32px; }
  .phone__screen { padding-top: 32px; }
  .phone__avatar { width: 68px; height: 68px; font-size: 28px; }
  .lock { width: 52px; height: 52px; font-size: 24px; border-radius: 14px; }
  .lock--one { left: 4%; }
  .lock--two { right: 4%; }
}

/* ---------------------------------------------------------------- разделы */

.section { padding: 88px 0; }
.section--tint { background: var(--bg-tint); }

h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section__lead { margin: 0 0 40px; color: var(--muted); font-size: 18px; max-width: 42em; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}

.card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-3px); }
.card__icon { font-size: 28px; line-height: 1; margin-bottom: 14px; }
.card h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---------------------------------------------------------------- схема */

.diagram {
  margin: 0 0 40px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.diagram svg { width: 100%; height: auto; }
.diagram__device { fill: color-mix(in srgb, var(--brand-light) 16%, var(--surface)); stroke: var(--brand-mid); stroke-width: 2; }
.diagram__server { fill: var(--bg-tint); stroke: var(--line); stroke-width: 2; }
.diagram__label { fill: var(--text); font: 600 17px var(--font); text-anchor: middle; }
.diagram__label--small { font-size: 15px; }
.diagram__label--muted { fill: var(--muted); font-weight: 400; font-size: 13px; }
.diagram__note { fill: var(--muted); font: 13px var(--font); text-anchor: middle; }
.diagram__line { fill: none; stroke: var(--muted); stroke-width: 2; }
.diagram__line--dashed { stroke-dasharray: 6 6; }
.diagram__line--strong { stroke: var(--ok); stroke-width: 4; }
.diagram__head { fill: var(--muted); }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 22px 22px 22px 66px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 15.5px;
}
.steps li strong { color: var(--text); }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: var(--brand-grad);
}

/* ---------------------------------------------------------------- загрузки */

.platforms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.platform {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Платформа, с которой зашли, — первой и заметнее остальных. Остальные
   не прячем: человек мог зайти с телефона, а ставить собирается на ноутбук. */
.platform.is-yours {
  order: -1;
  border-color: var(--brand-mid);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-light) 35%, transparent), var(--shadow);
}
.platform.is-yours .platform__head h3::after {
  content: "Ваша платформа";
  margin-left: 10px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand-light) 22%, transparent);
  border-radius: 999px;
}

.platform--soon { opacity: 0.7; }

.platform__head { display: flex; gap: 14px; align-items: center; }
.platform__icon { font-size: 30px; line-height: 1; }
.platform__head h3 { margin: 0; font-size: 19px; }
.platform__req { margin: 0; font-size: 14px; color: var(--muted); }
.platform__meta { margin: 0; font-size: 14px; color: var(--muted); }
.platform .btn { align-self: stretch; }

.platform__details { font-size: 14.5px; color: var(--muted); }
.platform__details summary { cursor: pointer; color: var(--text); font-weight: 600; }
.platform__details ol { padding-left: 20px; margin: 10px 0; }
.sha { margin: 8px 0 0; }

.verify { margin-top: 28px; font-size: 14.5px; color: var(--muted); }

/* ---------------------------------------------------------------- вопросы */

.faq {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 18px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--brand); transition: transform 0.2s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 12px 0 0; color: var(--muted); }

/* ---------------------------------------------------------------- подвал */

.footer { padding: 48px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.footer__grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.footer__muted { color: var(--muted); margin: 6px 0 0; }
.footer__legal { color: var(--muted); text-align: right; }
.footer__legal p { margin: 0 0 8px; }
@media (max-width: 720px) { .footer__legal { text-align: left; } }

/* ---------------------------------------------------------------- страница политики */

.doc { padding: 56px 0 88px; }
.doc h1 { font-size: clamp(28px, 4vw, 40px); }
.doc h2 { font-size: 22px; margin-top: 40px; }
.doc p, .doc li { color: var(--text); }
.doc .muted { color: var(--muted); }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border: 1px solid var(--line); }
.doc th { background: var(--bg-tint); }
