/* Шрифт лежит рядом. Сайт, который спорит с тем, что отправитель не
   должен видеть ваш адрес, не может тянуть шрифт с чужого сервера. */
@font-face {
  font-family: 'Golos Text';
  src: url('fonts/GolosText-Variable.ttf') format('truetype-variations');
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --accent: #0f6e66;
  --accent-pressed: #0b4f49;
  --docs: #8a76b8;
  --docs-band: #ede9f5;
  --text: #3a4443;
  --text-2: #646f6e;
  --page: #ffffff;
  --raised: #f6f8f8;
  --success: #2e7d53;
  --error: #b03a2e;

  --rule: color-mix(in srgb, var(--text) 14%, transparent);
  --frame-border: color-mix(in srgb, var(--text) 16%, transparent);
  --frame-shadow: 0 16px 40px rgb(0 0 0 / 10%), 0 2px 8px rgb(0 0 0 / 6%);

  /* Шесть размеров, больше нельзя. */
  --display: 48px;
  --section: 36px;
  --feature: 26px;
  --lede: 22px;
  --body-lg: 18px;
  --body: 16px;

  /* Шаг 4 пикселя. */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 80px;

  --r1: 4px; --r2: 8px; --r3: 12px; --r4: 16px;

  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #43c0ae;
    --accent-pressed: #0f6e66;
    --docs-band: #14101e;
    --text: #e6eaea;
    --text-2: #9aa4a3;
    --page: #0b0f0f;
    --raised: #151b1b;

    --frame-border: color-mix(in srgb, var(--text) 14%, transparent);
    --frame-shadow: 0 16px 40px rgb(0 0 0 / 40%), 0 2px 8px rgb(0 0 0 / 24%);
  }
}

*, *::before, *::after { box-sizing: border-box; }

/* Собственный display у класса перебивает встроенное правило браузера
   для [hidden], и спрятанное остаётся на виду. Ловушка известная. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: 'Golos Text', system-ui, sans-serif;
  font-size: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Адреса, домены и всё, что человек станет копировать. */
.mono, code, kbd {
  font-family: var(--mono);
  font-size: 0.92em;
  font-variant-numeric: tabular-nums;
}

.wrap {
  width: min(100% - var(--s5) * 2, 1040px);
  margin-inline: auto;
}

.narrow { max-width: 62ch; }

h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
h1 { font-size: var(--display); line-height: 1.08; font-weight: 800; }
h2 { font-size: var(--section); line-height: 1.15; font-weight: 800; }
h3 { font-size: var(--feature); line-height: 1.25; font-weight: 700; }
p  { margin: 0; text-wrap: pretty; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-pressed); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r1); }

.lede { font-size: var(--lede); line-height: 1.45; color: var(--text-2); }
.eyebrow {
  font-size: var(--body);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}
.muted { color: var(--text-2); }

/* ── шапка ─────────────────────────────────────────────────────── */

.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.top .wrap {
  display: flex; align-items: center; gap: var(--s5);
  padding-block: var(--s4);
}
.brand { font-weight: 800; font-size: var(--body-lg); letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.brand span { color: var(--accent); }
.top nav { margin-left: auto; display: flex; gap: var(--s5); flex-wrap: wrap; }
.top nav a { color: var(--text-2); text-decoration: none; }
.top nav a:hover { color: var(--accent); }

/* ── секции ────────────────────────────────────────────────────── */

section { padding-block: var(--s9); border-top: 1px solid var(--rule); }
section:first-of-type { border-top: 0; }
.band-docs { background: var(--docs-band); }
.stack { display: flex; flex-direction: column; gap: var(--s5); }
.stack-tight { display: flex; flex-direction: column; gap: var(--s3); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s7) var(--s6);
}

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s7);
  align-items: center;
}
@media (min-width: 1000px) { .split { grid-template-columns: 1fr 1fr; } }

.feature h3 { margin-bottom: var(--s2); }
.feature p { color: var(--text-2); }

/* ── кнопки ────────────────────────────────────────────────────── */

.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: var(--s3) var(--s5);
  border: 0; border-radius: var(--r2);
  background: var(--accent); color: var(--page);
  font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none;
  transition: background 200ms var(--ease);
}
.button:hover { background: var(--accent-pressed); color: var(--page); }

/* ── рамка снимка ──────────────────────────────────────────────── */

.frame {
  border: 1px solid var(--frame-border);
  border-radius: var(--r3);
  box-shadow: var(--frame-shadow);
  background: var(--raised);
  overflow: hidden;
}
.frame + .caption { margin-top: var(--s3); font-size: var(--body); color: var(--text-2); }

/* ── макет почты ───────────────────────────────────────────────── */

.mail-head {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--rule);
  font-weight: 700;
}
.mail-head .addr { margin-left: auto; font-weight: 400; color: var(--text-2); }
.row {
  display: grid; grid-template-columns: 40px 1fr auto;
  gap: var(--s3); align-items: start;
  padding: var(--s4);
  border-bottom: 1px solid var(--rule);
}
.row:last-child { border-bottom: 0; }
.avatar {
  width: 40px; height: 40px; border-radius: var(--r2);
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: #fff;
}
.row .who { font-weight: 700; }
.row .subj { margin-top: 2px; }
.row .prev { margin-top: 2px; color: var(--text-2); }
.row time { color: var(--text-2); font-size: var(--body); white-space: nowrap; }
.pill {
  display: inline-block; padding: 2px var(--s2);
  border-radius: var(--r1); background: var(--docs-band); color: var(--docs);
  font-size: 14px; font-weight: 700;
}

/* ── документ ──────────────────────────────────────────────────── */

.doc { padding: var(--s6); font-size: var(--body-lg); line-height: 1.7; }
.doc .title { font-weight: 700; margin-bottom: var(--s4); }
.doc del { color: var(--error); text-decoration-thickness: 1px; }
.doc ins { color: var(--success); text-decoration: none; border-bottom: 2px solid var(--success); }
.doc .note {
  margin-top: var(--s4); padding-left: var(--s4);
  border-left: 3px solid var(--accent); color: var(--text-2);
}

.terminal {
  font-family: var(--mono); font-size: var(--body);
  padding: var(--s5); line-height: 1.8;
}
.terminal .cmd::before { content: '$ '; color: var(--text-2); }
.terminal .out { color: var(--text-2); }

/* ── диаграмма приватности ─────────────────────────────────────── */

.diagram {
  display: grid; gap: var(--s4);
  grid-template-columns: 1fr;
  align-items: stretch;
}
@media (min-width: 1000px) {
  .diagram { grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; }
}
.node {
  padding: var(--s5);
  border: 1px solid var(--frame-border);
  border-radius: var(--r3);
  background: var(--raised);
  height: 100%;
}
.node h3 { font-size: var(--body-lg); margin-bottom: var(--s2); }
.node p { color: var(--text-2); }
.node .fact {
  margin-top: var(--s4); padding-top: var(--s3);
  border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: 14px;
}
.node .fact.good { color: var(--accent); }
.node .fact.bad { color: var(--error); text-decoration: line-through; }
.arrow {
  display: grid; place-items: center; gap: var(--s1);
  color: var(--text-2); font-size: 14px; text-align: center;
}
.arrow .line { color: var(--accent); font-size: var(--lede); line-height: 1; }
@media (max-width: 999px) { .arrow .line { rotate: 90deg; } }

/* ── поле для адреса ───────────────────────────────────────────── */

/* Подпись поля нужна тем, кто слушает страницу, а не смотрит на неё. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.capture { display: flex; gap: var(--s3); flex-wrap: wrap; }
.capture input {
  flex: 1 1 260px;
  padding: var(--s3) var(--s4);
  border: 1px solid var(--frame-border);
  border-radius: var(--r2);
  background: var(--page); color: var(--text);
  font: inherit; font-family: var(--mono); font-size: var(--body);
  transition: border-color 200ms var(--ease);
}
.capture input::placeholder { color: var(--text-2); }
.capture input:focus { border-color: var(--accent); outline: none; }
.capture input[aria-invalid='true'] { border-color: var(--error); }
.hint { font-size: var(--body); color: var(--error); }
.done { color: var(--success); }

/* ── цены ──────────────────────────────────────────────────────── */

.plans { display: grid; grid-template-columns: 1fr; gap: var(--s5); }
@media (min-width: 800px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan {
  padding: var(--s6);
  border: 1px solid var(--frame-border);
  border-radius: var(--r3);
  background: var(--raised);
  display: flex; flex-direction: column; gap: var(--s4);
}
.plan .price { font-size: var(--section); font-weight: 800; letter-spacing: -0.02em; }
.plan .price small { font-size: var(--body); font-weight: 400; color: var(--text-2); letter-spacing: 0; }
.plan ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--s3); }
.plan li { display: grid; grid-template-columns: 20px 1fr; gap: var(--s2); color: var(--text-2); }
.plan li::before { content: '—'; color: var(--accent); }
.placeholder {
  padding: 0 var(--s2);
  border-radius: var(--r1);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

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

.qa { display: flex; flex-direction: column; }
.qa details { border-bottom: 1px solid var(--rule); padding-block: var(--s5); }
.qa summary {
  font-size: var(--body-lg); font-weight: 700; cursor: pointer;
  list-style: none; display: flex; align-items: center; gap: var(--s3);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: '+'; margin-left: auto; color: var(--accent);
  font-size: var(--feature); line-height: 1; font-weight: 400;
}
.qa details[open] summary::after { content: '–'; }
.qa p { margin-top: var(--s3); color: var(--text-2); max-width: 62ch; }

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

footer { padding-block: var(--s7); border-top: 1px solid var(--rule); }
footer .wrap { display: flex; gap: var(--s5); flex-wrap: wrap; align-items: center; }
footer nav { display: flex; gap: var(--s5); flex-wrap: wrap; margin-left: auto; }
footer a { color: var(--text-2); text-decoration: none; }
footer a:hover { color: var(--accent); }
.fineprint { width: 100%; color: var(--text-2); font-size: var(--body); }

/* ── появление ─────────────────────────────────────────────────── */

.rise { animation: rise 250ms var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

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

@media (max-width: 700px) {
  :root { --display: 36px; --section: 28px; --feature: 22px; --lede: 18px; }
  section { padding-block: var(--s7); }

  /* Вчетвером в одну строку они не помещаются и последний пункт
     наезжает на название. Уводим меню под него отдельной строкой. */
  .top .wrap { flex-wrap: wrap; gap: var(--s3); }
  .top nav {
    margin-left: 0;
    width: 100%;
    gap: var(--s4);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .top nav::-webkit-scrollbar { display: none; }
  .top nav a { white-space: nowrap; }

  footer .wrap { flex-direction: column; align-items: flex-start; }
  footer nav { margin-left: 0; }
}

/* ── текстовые страницы ────────────────────────────────────────── */

.prose { max-width: 68ch; }
.prose h2 { margin-top: var(--s8); }
.prose h2:first-of-type { margin-top: var(--s5); }
.prose h3 { font-size: var(--body-lg); margin-top: var(--s6); }
.prose p, .prose ul { margin-top: var(--s3); color: var(--text-2); }
.prose ul { padding-left: var(--s5); display: flex; flex-direction: column; gap: var(--s2); }
.prose strong { color: var(--text); }
.prose .updated { font-family: var(--mono); font-size: 14px; }

/* Признак работы службы: цвет и слово, не один только цвет —
   иначе состояние не прочитать тому, кто цвета не различает. */
.status-row {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--rule);
}
.status-row:last-child { border-bottom: 0; }
.status-row .name { font-weight: 600; }
.status-row .state { margin-left: auto; display: flex; align-items: center; gap: var(--s2); }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.up { background: var(--success); }
.dot.unknown { background: var(--text-2); }
