/* SEO-страницы Ruibos - тёмная тема, шрифты как в приложении.
   Подключается только из public/*.html (статические страницы), не из сборки приложения. */
:root {
  --bg: #0a0b0f;
  --bg-card: #11131b;
  --bg-secondary: #0f1117;
  --border: #23272e;
  --border-strong: #333a46;
  --text: #e8eaf0;
  --text-dim: #8b92a0;
  --text-muted: #636a78;
  --accent: #7be0ff;
  --accent-light: #dcfbff;
  --accent-glow: #7be0ff22;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

html { line-height: 1.5; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
}

/* Мягкое свечение сверху, чтобы страница не выглядела плоским текстовым блоком. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 340px;
  background: radial-gradient(60% 100% at 50% 0%, var(--accent-glow), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--accent-light); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent); color: #061019; }

.container {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 72px;
}

/* ── Верхняя навигация: один и тот же блок на всех страницах ───────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  margin: 0 -20px 34px;
  padding: 11px 20px;
  background: rgba(10, 11, 15, 0.92);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--mono);
  font-size: 12px;
}
.site-nav .brand {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
  margin-right: 4px;
}
.site-nav .brand:hover { color: var(--accent); }
.site-nav a:not(.brand) { color: var(--text-muted); text-decoration: none; padding: 2px 0; }
.site-nav a:not(.brand):hover { color: var(--accent); }
.site-nav a.on { color: var(--accent-light); border-bottom: 1px solid var(--accent); }

/* Хлебные крошки: сразу под навигацией, тонким монотекстом */
.crumbs {
  margin: -20px 0 28px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
}
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs span { margin: 0 8px; opacity: 0.5; }

.header { text-align: center; margin-bottom: 40px; }
.header h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
  line-height: 1.18;
}
.header .lede, .lede {
  font-size: 17px;
  color: var(--text-dim);
  line-height: 1.65;
}
.header .lede {
  max-width: 640px;
  margin: 0 auto;
}

h2 {
  font-size: 22px;
  margin: 42px 0 14px;
  padding-left: 13px;
  border-left: 2px solid var(--accent);
  color: var(--text);
  letter-spacing: -0.015em;
  scroll-margin-top: 72px;
}
h3 {
  font-size: 16px;
  margin: 26px 0 10px;
  color: var(--accent-light);
}

p { margin: 0 0 14px; color: var(--text-dim); line-height: 1.75; }
ul, ol { margin: 8px 0 20px; color: var(--text-dim); line-height: 1.75; padding-left: 22px; }
li { margin-bottom: 6px; }
strong { color: var(--text); }

.card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 16px;
  padding: 20px 24px;
  margin: 24px 0;
}
.card .kicker { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent-light); margin-bottom: 10px; font-weight: 700; }

table { width: 100%; border-collapse: collapse; margin: 16px 0 26px; font-size: 14px; }
th { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border-strong); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-dim); }
tbody tr:hover td { background: var(--bg-secondary); }

.faq q { display: block; color: var(--text); font-weight: 600; margin-top: 20px; }
.faq .a { margin: 6px 0 18px; color: var(--text-dim); }

/* ── Подвал: текстовые ссылки на все разделы + юридическая строка ──────── */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12px;
}
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }

.footer-note {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
  line-height: 1.7;
}

.small { font-size: 13px; color: var(--text-muted); }
.mono { font-family: var(--mono); font-size: 12px; }

.note { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; margin: 20px 0; font-size: 13px; color: var(--text-dim); }
.note b { color: var(--text); }

/* Форма обратной связи на /kontakty: адрес поддержки живёт на сервере, в HTML его нет. */
.contact-form {
  position: relative;
  display: grid;
  gap: 16px;
  max-width: 620px;
  margin: 22px 0 8px;
  padding: 22px;
  scroll-margin-top: 80px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.contact-form .form-row { display: grid; gap: 7px; }
.contact-form label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  padding: 12px 14px;
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.contact-form input:hover,
.contact-form select:hover,
.contact-form textarea:hover { border-color: #40485a; }
.contact-form textarea { min-height: 160px; resize: vertical; }
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-muted); }
/* Своя стрелка у select: системная в тёмной теме выглядит как обрубок. */
.contact-form select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%238b92a0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 8px;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #10141c;
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.contact-form .form-consent label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.5;
  color: var(--text-muted);
  cursor: pointer;
}
.contact-form .form-consent input {
  flex: none;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 1px 0 0;
  padding: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.contact-form .form-consent a {
  color: var(--accent-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.contact-form .form-consent input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: none;
}
.contact-form button[type="submit"] {
  justify-self: start;
  min-height: 46px;
  margin-top: 4px;
  padding: 12px 28px;
  background: var(--accent);
  color: #04121a;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease, transform 0.1s ease;
}
.contact-form button[type="submit"]:hover { background: var(--accent-light); }
.contact-form button[type="submit"]:active { transform: translateY(1px); }
.contact-form button[type="submit"]:disabled { opacity: 0.6; cursor: not-allowed; }
/* Ловушка для ботов: поле есть в разметке, но человек его не видит. */
.contact-form .honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status { margin: 0; min-height: 1em; font-size: 13px; line-height: 1.5; }
.form-status.ok { color: var(--accent); }
.form-status.err { color: #ff8b8b; }

/* Вложения: поле выбора файла, подсказка и список выбранного. */
.contact-form .label-hint {
  margin-left: 6px;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
}
.contact-form .file-drop {
  padding: 4px;
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.012);
}
.contact-form input[type="file"] {
  min-height: auto;
  padding: 10px 10px 6px;
  border: 0;
  background: transparent;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
}
.contact-form input[type="file"]:hover { border: 0; }
.contact-form input[type="file"]:focus { box-shadow: none; background: transparent; }
.contact-form input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #171c26;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.contact-form input[type="file"]::file-selector-button:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}
.form-hint {
  margin: 2px 6px 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}
.file-list {
  margin: 0 0 4px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.file-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 7px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text-dim);
}
.file-list .file-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.file-list .file-size { flex: 0 0 auto; font-family: var(--mono); font-size: 11px; color: var(--text-muted); }
.file-list .file-remove {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.file-list .file-remove:hover { color: #ff8b8b; border-color: #ff8b8b; }

@media (max-width: 640px) {
  .container { padding: 0 16px 56px; }
  .site-nav { margin: 0 -16px 26px; padding: 10px 16px; gap: 4px 12px; }
  .header { margin-bottom: 30px; }
  .header h1 { font-size: 27px; }
  h2 { font-size: 19px; margin-top: 32px; }
}
