/* ------------------------------------------------------------------
   Bixl — корпоративный сайт
   Статика без сборки. Внешних запросов нет: шрифты системные,
   всё остальное лежит на своём домене.
   ------------------------------------------------------------------ */

:root {
  /* Сайт всегда светлый: тёмного оформления нет.
     color-scheme не даёт браузеру принудительно затемнять страницу. */
  color-scheme: light;

  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-card: #ffffff;
  --text: #16191d;
  --text-muted: #5b6470;
  --text-faint: #858e9a;
  --border: #e3e6ea;
  --accent: #1f5fd0;
  --accent-hover: #17499f;
  --warn-bg: #fdf4ec;
  --warn-border: #e9c9a6;
  --warn-text: #7a4a17;

  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 960px;
  --gutter: 20px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Раскладка ---------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* --- Шапка -------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  min-height: 64px;
  padding-block: 10px;
}

.brand {
  display: flex;
  align-items: center;
  flex: none;
  margin-right: auto;
  line-height: 0;
  border-radius: var(--radius-sm);
}
.brand img {
  width: 133px;
  height: 30px;
  display: block;
}
.brand:hover { text-decoration: none; opacity: .75; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--text-muted);
  font-size: 15px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.nav a:hover {
  color: var(--text);
  background: var(--bg-soft);
  text-decoration: none;
}
.nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
  background: var(--bg-soft);
}

.lang {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
  font-size: 14px;
}
.lang a,
.lang span {
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--text-faint);
}
.lang a:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.lang [aria-current="true"] {
  color: var(--text);
  font-weight: 650;
  background: var(--bg-soft);
}

/* --- Секции ------------------------------------------------------- */

.section { padding-block: 56px; }
.section + .section { padding-top: 0; }
.section-soft {
  background: var(--bg-soft);
  border-block: 1px solid var(--border);
  padding-block: 56px;
}
.section-soft + .section { padding-top: 56px; }

.hero { padding-block: 72px 56px; }

h1 {
  font-size: clamp(30px, 6vw, 44px);
  line-height: 1.15;
  letter-spacing: -.022em;
  margin: 0 0 18px;
  font-weight: 680;
}

h2 {
  font-size: clamp(22px, 4vw, 28px);
  line-height: 1.25;
  letter-spacing: -.015em;
  margin: 0 0 16px;
  font-weight: 660;
}

h3 {
  font-size: 18px;
  line-height: 1.35;
  margin: 0 0 8px;
  font-weight: 650;
}

p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: clamp(17px, 2.4vw, 20px);
  color: var(--text-muted);
  max-width: 62ch;
}

.muted { color: var(--text-muted); }
.small { font-size: 15px; }

.prose { max-width: 70ch; }
.prose h2 { margin-top: 40px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 28px; }
.prose ul { padding-left: 22px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.prose li:last-child { margin-bottom: 0; }

/* --- Карточки и сетки --------------------------------------------- */

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

/* Реквизиты компании */
.facts {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.facts > div {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 4px 20px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.facts > div:last-child { border-bottom: 0; }

.facts dt { color: var(--text-muted); font-size: 15px; }
.facts dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }

@media (max-width: 639px) {
  .facts > div {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 13px 16px;
  }
  .facts dt { font-size: 14px; }
}

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

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  border: 1px solid transparent;
  text-align: center;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }

/* Неактивная кнопка App Store: не ссылка, а disabled-элемент */
.btn-disabled {
  background: var(--bg-soft);
  color: var(--text-faint);
  border-color: var(--border);
  cursor: default;
}

/* --- Карточка приложения ------------------------------------------ */

.app-head {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.app-icon {
  width: 104px;
  height: 104px;
  border-radius: 23%;
  border: 1px solid var(--border);
  flex: none;
  background: var(--bg-soft);
}

.app-head-text { flex: 1 1 320px; min-width: 0; }
.app-head-text h1,
.app-head-text h2 { margin-bottom: 8px; }

.app-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.app-meta li {
  font-size: 14px;
  color: var(--text-muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
}

/* Скриншоты: горизонтальная прокрутка на узком экране.
   Сейчас на страницах не используются — блок оставлен, чтобы вернуть
   скриншоты одной вставкой разметки. См. _tools/README.md */
.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 240px);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shots figure { margin: 0; }
.shots img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  scroll-snap-align: start;
  background: var(--bg-soft);
}
.shots figcaption {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* --- Предупреждение ----------------------------------------------- */

.notice {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.notice h2,
.notice h3 { color: var(--warn-text); margin-top: 0; }
.notice ul { padding-left: 20px; margin: 0; }
.notice li { margin-bottom: 8px; }
.notice li:last-child { margin-bottom: 0; }

/* --- FAQ ---------------------------------------------------------- */

.faq { border-top: 1px solid var(--border); }
.faq > div {
  border-bottom: 1px solid var(--border);
  padding-block: 22px;
}
.faq h3 { margin-bottom: 6px; }
.faq p { color: var(--text-muted); }

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

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  margin-top: 72px;
  padding-block: 36px;
  font-size: 15px;
  color: var(--text-muted);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 48px;
  justify-content: space-between;
}

.site-footer strong {
  color: var(--text);
  font-weight: 620;
  display: block;
  margin-bottom: 6px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-faint);
}

/* --- Узкие экраны (проверено на 375 px) ---------------------------- */

@media (max-width: 767px) {
  body { font-size: 16px; }

  /* Название и переключатель языка — одной строкой, навигация под ними */
  .site-header .wrap { padding-block: 12px; gap: 8px 10px; }
  .brand { order: 1; margin-right: auto; }
  .brand img { width: 115px; height: 26px; }
  .lang { order: 2; margin-left: 0; padding-left: 12px; }
  .nav { order: 3; width: 100%; margin-left: -10px; }

  .hero { padding-block: 44px 36px; }
  .section { padding-block: 40px; }
  .section-soft { padding-block: 40px; }
  .section-soft + .section { padding-top: 40px; }

  .app-icon { width: 84px; height: 84px; }
  .card { padding: 18px; }
  .notice { padding: 18px; }
  .site-footer { margin-top: 48px; }

  .btn { width: 100%; }
  .btn-row { gap: 10px; }
}

@media (max-width: 400px) {
  :root { --gutter: 16px; }
  .app-head { gap: 16px; }
}

@media print {
  .site-header, .site-footer, .btn-row { display: none; }
  body { font-size: 12pt; color: #000; background: #fff; }
}
