/*
 * Сайт encalma.app: цвета и шрифт приложения (app/src/ui/theme.ts).
 * Светлая и тёмная тема сами по настройке телефона. Без скриптов и чужих файлов.
 */

@font-face {
  font-family: 'Manrope';
  src: url('/fonts/Manrope-400.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('/fonts/Manrope-600.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f3f5f8;
  --card: #ffffff;
  --card2: #eff2f5;
  --line: rgba(16, 24, 40, 0.08);
  --text: #0e141c;
  --text2: #465163;
  --text3: #5e6776;
  --accent: #34d391;
  --accent-text: #08784f;
  --accent-soft: rgba(16, 170, 110, 0.11);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0d12;
    --card: #141920;
    --card2: #1b212a;
    --line: rgba(255, 255, 255, 0.07);
    --text: #f2f4f7;
    --text2: #aeb6c1;
    --text3: #858e9a;
    --accent: #3ddc97;
    --accent-text: #4be3a2;
    --accent-soft: rgba(61, 220, 151, 0.13);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px;
}

a {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 32px;
  margin: 8px 0 4px;
}

h2 {
  font-size: 22px;
  margin: 44px 0 10px;
}

h3 {
  font-size: 18px;
  margin: 28px 0 6px;
}

p,
ul {
  margin: 0 0 14px;
}

ul {
  padding-left: 22px;
}

li {
  margin-bottom: 8px;
}

strong {
  font-weight: 600;
}

/* ---------- шапка и языки ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
}

.brand img {
  border-radius: 8px;
}

.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.langs a {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card2);
  color: var(--text2);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.langs a[aria-current='page'] {
  background: var(--accent-soft);
  color: var(--accent-text);
}

/* ---------- главная ---------- */

.home {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.home .top {
  justify-content: flex-end;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 0 40px;
}

.logo {
  border-radius: 22px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 40px;
  margin: 0 0 8px;
}

.lead {
  font-size: 21px;
  line-height: 1.45;
  color: var(--text2);
  max-width: 30em;
}

.soon {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 600;
  font-size: 15px;
}

/* ---------- политика ---------- */

.date {
  color: var(--text3);
  font-size: 15px;
  margin-bottom: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 20px 6px;
  margin: 0 0 14px;
}

.card h2 {
  margin-top: 0;
  font-size: 19px;
}

.doc section {
  scroll-margin-top: 16px;
}

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

.foot {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding: 20px 0 40px;
  color: var(--text3);
  font-size: 15px;
}

.home .foot {
  margin-top: 0;
}

.foot p {
  margin-bottom: 8px;
}

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

  h1 {
    font-size: 28px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .lead {
    font-size: 19px;
  }
}
